Skip to content
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

npm install fails due to "Operation timed out" error with git protocol #179

Open
sunnypranay opened this issue Nov 4, 2023 · 1 comment

Comments

@sunnypranay
Copy link

Description:

  • Attempting to install the moonrider repository dependencies via npm install results in a timeout error. It seems the issue arises when trying to fetch packages using the git protocol.
  1. Environment Information:

    • Apple M1 Pro - Sonoma 14.1
  2. Steps to Reproduce:

    1. Clone the repository `git clone git@github.com:supermedium/moonrider.git`
    2. Navigate to the repository directory `cd moonrider`
    3. Run `npm install`
    
  3. Expected Behavior:

    • I expected npm install to install all dependencies without any issues.
  4. Actual Behavior:

    While executing `npm install`, the installation process fails with the following error:
    
    24727 error Error while executing:
    24727 error /usr/bin/git ls-remote -h -t git://github.com/mishoo/UglifyJS2.git
    24727 error
    24727 error fatal: unable to connect to github.com:
    24727 error github.com[0: 140.82.114.3]: errno=Operation timed out
    
  5. Possible Solution:

    • It appears that the issue might be related to the use of the git protocol in package URLs. A potential fix could be to switch to the HTTPS protocol as follows:

    • Change the URLs in package.json from:

       "uglify-es": "git://github.com/mishoo/UglifyJS2.git#harmony",
       "uglify-js": "git://github.com/mishoo/UglifyJS2#harmony",
    • To
       "uglify-es": "https://github.com/mishoo/UglifyJS2.git#harmony",
       "uglify-js": "https://github.com/mishoo/UglifyJS2#harmony",
@reallaborious
Copy link

I've just tried to replace it this way in package-lock.json and get other errors:

npm WARN tarball tarball data for three@git+https://github.com/supermedium/three.js.git#5ef2887ab3621cae54fa129a500424d6caa25b62 (sha512-I3qUdpDBTltVg6YXEZQeckf6GCq8u/6elelab9kfHzkloUzb9aexZyNVyselBejvSmqxq70VIJksRQgxGoeJ1Q==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for three@git+https://github.com/supermedium/three.js.git#5ef2887ab3621cae54fa129a500424d6caa25b62 (sha512-I3qUdpDBTltVg6YXEZQeckf6GCq8u/6elelab9kfHzkloUzb9aexZyNVyselBejvSmqxq70VIJksRQgxGoeJ1Q==) seems to be corrupted. Trying one more time.
npm ERR! code EINTEGRITY
npm ERR! Verification failed while extracting three@git+https://github.com/supermedium/three.js.git#5ef2887ab3621cae54fa129a500424d6caa25b62:
npm ERR! Verification failed while extracting three@git+https://github.com/supermedium/three.js.git#5ef2887ab3621cae54fa129a500424d6caa25b62:
npm ERR! sha512-I3qUdpDBTltVg6YXEZQeckf6GCq8u/6elelab9kfHzkloUzb9aexZyNVyselBejvSmqxq70VIJksRQgxGoeJ1Q== integrity checksum failed when using sha512: wanted sha512-I3qUdpDBTltVg6YXEZQeckf6GCq8u/6elelab9kfHzkloUzb9aexZyNVyselBejvSmqxq70VIJksRQgxGoeJ1Q== but got sha512-DqIiu7ihy94n/Ediro/hchedbNbFhvYpb31ZPXlKbmTN3fo7tnICW3l4u4PA5vx2ySiTTpT2YmtNTox/Z8HB8A==. (3410328 bytes)

For me it's about other packages, but as soon as the initial error was the same, reason of the error should be the same either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants