GitHub 无法从 npm 存储库中提取

Tor*_*che 1 github npm angular

我已经尝试了大约 2 个小时来获取一个存储库:https ://github.com/cmelange/ECL-3D-Components#ecl-3d-components加载到我的角度项目中,但没有运气。

  • 我之前已经让它工作过并且一直在尝试这个命令npm i cmelange/ECL-3D-Components#v1.0
  • 我还尝试从我的 powershell ping github 服务器,它有响应,只是找不到页面。
  • 我工作的支持部门告诉我防火墙不是问题,但我不知道还有什么问题......
npm ERR!     C:\Users\tassc\AppData\Roaming\npm-cache\_logs\2020-02-04T12_35_00_266Z-debug.log
PS C:\Users\tassc\Projects\PatioCoveringModels> npm i
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/cmelange/ECL-3D-Components.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 140.82.118.4]: errno=No such file or directory
npm ERR!
npm ERR!
npm ERR! exited with error code: 128

npm ERR!     C:\Users\tassc\AppData\Roaming\npm-cache\_logs\2020-02-04T12_56_46_865Z-debug.log
Run Code Online (Sandbox Code Playgroud)

Rav*_*ary 6

这是防火墙问题。我也经常面临这个问题。下面的方法对我有用。尝试以下命令并强制 npm 使用 http:// 而不是 git://。

rm -rf node_modules

rm -rf bower_components

git config --global url."https://".insteadOf git://

git config --global url."https://github.com/".insteadOf git@github.com:

让我们知道它是否也适合您。