angular - GitHub 无法从 npm repo 中提取
问题描述
我已经尝试了大约 2 个小时来获得一个 repo: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
解决方案
这是一个防火墙问题。我也经常面对这个问题。以下方法对我有用。尝试以下命令并强制 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:
让我们知道它是否也适合您。
推荐阅读
- sql - 如何在 PIVOT SQL 中使用 0 输出转换(空)值
- r - 基于边缘属性的最短路径与 igraph
- angular - Angular-Cli 与 ng-serve
- excel - 将另一个单元格值插入 IF 函数
- c# - 如何将值添加到线程本地列表
- javascript - ng2-bootstrap-modal 在 webpack 编译后不起作用
- android - 将图像 url 转换为位图,有时在标记中使用时显示内存不足错误
- python - Python:提取类和文本
- git - GitHub - 清理不需要的文件的历史记录
- typescript - 解构函数参数对象和 ...rest