我正在运行mac osx yosemite 10.10.5&每当我点击npm install -g ember-cli
npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/itsfadnis/.nvm/versions/io.js/v3.3.1/bin/iojs" "/Users/itsfadnis/.nvm/versions/io.js/v3.3.1/bin/npm" "install" "-g" "ember-cli" "--no-optional"
npm ERR! node v3.3.1
npm ERR! npm v2.14.3
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect
npm ERR! network connect ETIMEDOUT 103.245.222.162:80
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 settings.
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! Please include the following file with any support request:
npm ERR! /Users/itsfadnis/npm-debug.log
我尝试过以下操作,但没有一个有效:
npm set registry http://registry.npmjs.org
npm install -g ember-cli
sudo npm install -g ember-cli
网络连接绝对正常,我不在代理之后。 任何有关这方面的帮助将不胜感激。感谢。
事实证明,由于我的路由器启用了防火墙,它失败了。禁用它就行了!