Pat*_*tan 3 node.js npm gruntjs
我无法安装grunt模块.
C:\Users\maah4>npm install -g grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm ERR! network connect ETIMEDOUT
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli"
npm ERR! cwd C:\Users\maah4
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! syscall connect
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\maah4\npm-debug.log
npm ERR! not ok code 0
Run Code Online (Sandbox Code Playgroud)
我也尝试过以下配置.但它没有用.
npm config set registry http://registry.npmjs.org/
Run Code Online (Sandbox Code Playgroud)
我有一些代理,但我可以通过浏览器访问它.
请让我知道如何解决这个问题.
可能你的家/办公室有一个阻止npm的防火墙.
如果您通过npm设置代理,则可以修复它
npm config set proxy http://proxy-server-address:8080
npm config set https-proxy http://proxy-server-address:8080
Run Code Online (Sandbox Code Playgroud)
也许这个链接可以帮助您:http://blog.michaelfasani.com/tag/npm/
问候.
| 归档时间: |
|
| 查看次数: |
6599 次 |
| 最近记录: |