supermedium / moonrider

🌕🏄🏿 Surf the musical road among the stars. Side project built by two people in a few months to demonstrate WebXR.
https://moonrider.xyz
MIT License
581 stars 225 forks source link

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

Open sunnypranay opened 11 months ago

sunnypranay commented 11 months ago

Description:

  1. 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`
  2. Expected Behavior:

    • I expected npm install to install all dependencies without any issues.
  3. 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
  4. 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 commented 8 months ago

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.