verdaccio: Redirect to npmjs.com when a package is not found locally
Is your feature request related to a problem? Please describe. I’m always frustrated when I click on a package dependency and all I get is this:
{
"error": "File not found"
}
Describe the solution you’d like I would like to see a redirection to npmjs.com, whenever a package is not found locally.
Describe alternatives you’ve considered An alternative option would be to display a page with a little notice, indicating that the requested package does not exist locally, but on npmjs.com.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 17 (12 by maintainers)
@coolsp There is an API, documented over here. It’s just the npm registry which can be used to fetch data in JSON format (example).
Steps to reproduce:
Quod erat demonstrandum
Was thinking about same type of feature request. I’m using verdaccio only for scoped modules not to cache the official npm modules (at least for now). My scoped modules depend on some official modules but as those are not cached on verdaccio, clicking on them in the webui results in:
Would be nice that in the webui you immediately include the npmjs link with a little icon next to it to indicate that it is an external link. This would mean you would have to identify those modules prior to rendering the page. Or alternatively, as suggested by @axelrindle, redirect requests for non-cached modules to npmjs.