可以在phonecat应用程序上运行npm install

时间:2014-05-12 14:21:08

标签: angularjs

我正在按照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) 

是否有人遇到类似问题

1 个答案:

答案 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://正如其他人提到的那样。