-
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] npm install hangs for several minutes due to git ls-remote git:// url scheme #1673
Comments
npm If your bug is preproducible on If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo Closing: This is an automated message. |
1 similar comment
npm If your bug is preproducible on If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo Closing: This is an automated message. |
Oh my god, thank you @xiata -- modifying my ~/.gitconfig fixed this annoying hanging issue for me! Thank you! If you have a moment, can you explain what this actually does so that I can understand better?
Thank you again. |
@xiata Thank you so much for the workaround! |
Solved the issue for me as well. Thanks a lot! |
Current Behavior:
During install, the following command fails repeatedly on CentOS 8.2 boxes, but not macOS:
The git:// protocol handler should not be used with git commands, even if npm supports it. You're asking for trouble using protocol handlers that may be doing something special for the underlying operating system (e.g. vfs).
This was caught while watching
npm -ddd install --only=prod --no-audit
I noticed this issue because on my macOS machine, npm install takes 32 seconds, while on my CentOS 8.2 box, it was taking 12 minutes.
Expected Behavior:
During install, the following command to be run instead:
Steps To Reproduce:
npm install winston@3.3.1
Note: I found that they fixed the dependency not to require git in 3.3.2, but that just masks the underlying bug in npm.
WORK AROUND:
If you have to keep using packages that may depend on a git url, add to ~/.gitconfig or /etc/gitconfig:
Environment:
OS: CentOS 8.2.2004
Node: 10.21.0
NPM: 6.14.4
The text was updated successfully, but these errors were encountered: