question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scoped packages return 404

See original GitHub issue

Scoped 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:open
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
diervocommented, Dec 14, 2017

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.

0reactions
silverlyracommented, Feb 19, 2019

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, like https://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 through routes.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 our yarn.lock files, and then our yarn installs started to complete successfully.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found