-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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] installing git dep on non-existent branch results in unhelpful error message #3149
Comments
Action: determine where/when to throw error for non-existent branch |
This will be fixed when |
still getting this error on 8.19.2 when using a commit hash |
I was also getting this error on npm 10.9.0 when installing packages from GitHub with or without a commit hash. The error message is not helpful, because in fact the problem was that a dependency specified a commit hash that no longer existed in the repo. |
### Current Behavior:
Expected Behavior:
npm install
with erroneous git version on a github dependency whines about cache "already exists"Steps To Reproduce:
"dependencies": { "shex-test": "github:shexSpec/shexTest#master" }
npm install --cache /tmp/brand-new-cache
Environment:
Error Message:
The real prob had nothing to do with the cache, but simply that the
master
branch was renamed tomain
(which makes this a timely UI experience to improve).Related issue:
If you change to an existent branch (e.g.
main
),npm i
, change back, andnpm i
again, you see no error. Thepackage-lock.json
entry was changed to"shex-test": "github:shexSpec/shexTest#master"
but the node_modules entry appeared to stay onmain
. While playing with this, i had to reset to square 1 withrm -rf node_modules/ package-lock.json /tmp/brand-new-cache/
to get around this overly agreeable behavior.The text was updated successfully, but these errors were encountered: