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:
npx github:org/project.git
gives the error:
@org/project@1.0.0' is not in this registry.
In past versions of npx this worked fine and would create a package.json in ~/.npm/_npx/HASH/package.json that contained:
{
"dependencies": {
"@org/project": "github:org/project"
}
}
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:
40 silly idealTree buildDeps
41 silly fetch manifest @org/project@github:org/project
42 silly placeDep ROOT @org/project@1.0.0 OK for: want: github:org/project
43 timing idealTree:#root Completed in 428ms
but the nvm log for latest version that doesn't work shows:
40 silly idealTree buildDeps
41 silly fetch manifest @org/project@1.0.0
42 http fetch GET 404 https://registry.npmjs.org/@org%2fproject 377ms (cache skip)
43 http fetch GET 404 https://registry.npmjs.org/@org%2fproject 181ms (cache skip)
44 silly placeDep ROOT @org/project@ OK for: want: 1.0.0
45 timing idealTree:#root Completed in 567ms
Notice how the latest version is trying to use 1.0.0 and registry.npmjs.org instead of github
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)
npx -y github:org/project.git
gives the error:
@org/project@1.0.0' is not in this registry.
(org and project removed for privacy)
Environment
- npm: 8.12.1 or later
- Node.js: 18.4.0 or later
- OS Name: Mac OSX 12.3
- System Model Name: Macbook
- npm config:
; node bin location = /Users/myname/.nvm/versions/node/v18.4.0/bin/node
; node version = v18.4.0
; npm local prefix = /Users/myname/Projects/temp
; npm version = 8.12.1
; cwd = /Users/myname/Projects/temp
; HOME = /Users/myname
; Run `npm config ls -l` to show all defaults.
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
npxthis worked fine and would create a package.json in~/.npm/_npx/HASH/package.jsonthat 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.0andregistry.npmjs.orginstead ofgithubExpected 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