我正在按照https://docs.angularjs.org/tutorial/step_00
的教程学习angular-phonecat-master$ npm install
npm http GET https://registry.npmjs.org/karma
npm http GET https://registry.npmjs.org/protractor
npm http GET https://registry.npmjs.org/http-server
npm http GET https://registry.npmjs.org/bower
npm http GET https://registry.npmjs.org/shelljs
npm ERR! Error: failed to fetch from registry: protractor
来自npm-debug.log的日志如下
verbose raw, before any munging shelljs
verbose url resolving [ 'https://registry.npmjs.org/', './shelljs' ]
verbose url resolved https://registry.npmjs.org/shelljs
http GET https://registry.npmjs.org/shelljs
ERR! Error: failed to fetch from registry: shelljs
ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
........
ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
ERR! at ClientRequest.emit (events.js:67:17)
ERR! at HTTPParser.onIncoming (http.js:1261:11)
ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
是否有人遇到类似问题
答案 0 :(得分:1)
这可能会也可能不会奏效。但是尝试使用GIT下载你的应用程序,而不是下载zip,然后输入git config --global url。&#34; https://&#34; .insteadOf git://。
当我尝试在Windows 10上下载angular-seed项目时遇到了这个问题。我安装了GIT命令行。然后我使用GIT命令行下载项目,而不是下载ZIP。对于网络问题,我输入了git config --global url。&#34; https://&#34; .insteadOf git://正如其他人提到的那样。