我尝试npm install时出现以下错误:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.10.36
npm ERR! npm v2.12.1
npm ERR! Cannot read property 'latest' of undefined
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.10.36
npm ERR! npm v2.12.1
npm ERR! Cannot read property 'latest' of undefined
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.10.36
npm ERR! npm v2.12.1
npm ERR! Cannot read property 'latest' of undefined
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
Run Code Online (Sandbox Code Playgroud)
怎么了?我不能使用nodejs <0.10.36或> 0.11
更改缓存的位置.这肯定会奏效.默认情况下,NPM尝试从缓存中拾取包,并且有时禁止默认位置读取.
npm config set cache C:\ Dev \nodejs \npm-cache --global
干杯!
您可能想要指向本地注册表或防火墙后面的注册表
npm install --registry http://npm.myserver.com
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
28440 次 |
| 最近记录: |