-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] npx
no longer works with github:
registry
#5134
Comments
Here is the npm config for node 18.5.0 that has the same problem:
the log file has the same references to |
And then I force updated npm to the latest version via
|
Last known npm version where it was working is |
i'm not able to reproduce this one so far: > npx -y github:npm/cli --version
8.14.0 is this happening for you with any package coming from github, or only some specific subset? does the command that worked for me above work for you? |
I was seeing that it erroneously tries to talk to npmjs.com when it should be talking to GitHub. I'm guessing if you try to run something off of GitHub, but it's been published to npm, then it'll appear to work while the bug happens behind the scenes. Maybe try with something on GitHub that is known to not exist on npm. |
The |
Confirmed that the test with
and is missing any reference to github. |
This is the same root cause as #5132, which has already been triaged and prioritized. Closing this as a dupe and making a note there about this issue existing. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When using Node v18.4.0 or later (npm 8.12.1 or later), referencing a Github repo via:
gives the error:
In past versions of
npx
this worked fine and would create a package.json in~/.npm/_npx/HASH/package.json
that contained:but in the new versions of npx it seems to be trying to resolve the project in the main npm registry rather than using Github.
I also tried using a full Github URL path instead of just
github:
and got the same error.When I look at the nvm log, older versions that worked show:
but the nvm log for latest version that doesn't work shows:
Notice how the latest version is trying to use
1.0.0
andregistry.npmjs.org
instead ofgithub
Expected Behavior
Expected to download the repo package.json and execute a command.
Steps To Reproduce
When using Node v18.4.0 or later (npm 8.12.1 or later)
gives the error:
(org and project removed for privacy)
Environment
The text was updated successfully, but these errors were encountered: