Scoped packages return 404
See original GitHub issueScoped packages return a 404, for example the command: npm info @types/node --registry=http://myregistry.com
fails.
That being said it worked a couple of times so It might be related somehow with the issue #96 and #97, since it did work intermittently?
Note that in my server I do have applied the PR #98
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
404 when installing private scoped package from npm registry
I have published a scoped package, @X/Y , to the main npm registry. This is a private package, restricted to members of the...
Read more >Why am I getting 404 for some npm packages? - JFrog
However, when working with the npm public registry, HEAD requests will sometimes trigger a 404 error response even though the requested package ......
Read more >Installation of a scoped package resolve in an E404
So I came across this problem when I am trying to install the request-promise module via npm. It depends on a scoped package...
Read more >Surviving the npm ERR! 404 with private packages
Context: I'm doing some pair programming with one of my colleagues and we are trying to install a private npm package. Private packages...
Read more >Receive 404 error when trying to npm publish instead of 401
404 '@scope/package@0.2.9' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok I found the root cause: There is a a bunch of race conditions in
http-call
library due to incorrect use of async/await.The problem is described here: https://jakearchibald.com/2017/await-vs-return-vs-return-await/
Because of this the property
req.body
might be a string or JSON depending if the promise has been resolved.I just ran into this in switching from verdaccio to npm-register.
Most of the scoped packages in our
yarn.lock
files had URL-escaped/
s within their tarball URLs, likehttps://npm.abc.xyz/@vx%2ftext/-/text-0.0.165.tgz
. But some of them did not, and npm-register 404’d them:https://npm.abc.xyz/@vx/text/-/text-0.0.165.tgz
won’t work. Looking throughroutes.js
, it looks like those might work if the tarball name had a/hash
suffix.We used
sed
to url-escape all scoped package names in ouryarn.lock
files, and then ouryarn installs
started to complete successfully.