1
当我尝试从npmjs站点安装bower或yeoman时,我的“cmd”命令就像发生此错误一样。这里是错误:无法使用“cmd”命令在配置后安装bower和yeoman
D:\bow>npm install -g yo grunt-cli bower
npm http GET https://registry.npmjs.org/yo
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/bower
npm http GET https://registry.npmjs.org/yo
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/bower
npm http GET https://registry.npmjs.org/yo
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/bower
npm ERR! network tunneling socket could not be established, cause=getaddrinfo EN
OTFOUND
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\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo" "grunt-cli" "bower"
npm ERR! cwd D:\bow
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ECONNRESET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\bow\npm-debug.log
npm ERR! not ok code 0
我的用户名是“mb112830”,密码为“TECHM @ 112830”,我的服务器是“MSAT”和端口是80的话,检查它显示我的NPM的配置像这样:
D:\bow>npm help config
D:\bow>npm config list
; cli configs
registry = "https://registry.npmjs.org/"
; userconfig C:\Users\mb112830\.npmrc
https-proxy = "http://mb112830:TECHM%[email protected]:80/"
proxy = "http://mb112830:TECHM%[email protected]:80/"
regisry = "http://registry.npmjs.org/"
; builtin config undefined
prefix = "C:\\Users\\mb112830\\AppData\\Roaming\\npm"
; node bin location = C:\Program Files\nodejs\\node.exe
; cwd = D:\bow
; HOME = C:\Users\mb302811
; 'npm config ls -l' to show all defaults.
都是正确的。我也将环境变量设置为我的计算机属性。还有什么我需要做进一步检查直接使用“cmd”命令npm模块?
任何人都可以帮我解决这个问题吗?如果发现任何错误,请突出显示
在此先感谢!
这里是什么信息我的 '.npmrc' 文件包含
proxy = http://"mb302811:[email protected]"@msat:80/
https-proxy = http://"mb302811:[email protected]"@msat:80/
registry = http://registry.npmjs.org/
感谢。
当然让我试试并找回你。 – 3gwebtrain
我更新了。仍然只有错误。是否需要在系统环境中进行更新?也是可变的? – 3gwebtrain
你能否粘贴你的.npmrc文件。它可能在c:\ users \ \ .npmrc –