我正在使用Windows 7家庭溢价,我刚刚从官方网站安装了npm。我尝试通过npm安装一些模块,它显示了下面的日志。
到目前为止我还没有配置任何代理。我在用我的家庭网络连接。我不是公司代理!
====Executing命令'npm‘=
npm WARN package.json NerdRoom@0.0.0 No repository field.
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.12.0
npm ERR! npm v2.5.1
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
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! 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.12.0
npm ERR! npm v2.5.1
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
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! 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.12.0
npm ERR! npm v2.5.1
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
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'请帮我解决这个问题。
发布于 2016-04-06 16:50:33
我也有同样的问题,但我支持代理,但是试图解决这个问题也许可以帮助您,输入以下命令:
nmp config get proxy如果您有以前的poxy配置,它将显示如下预览配置:
http://Domain/User username:password@host:port这是一个例子,也可以是另一个例子。要点是,如果您以前有代理配置,则需要键入以下命令:
npm config set proxy null而且它必须正常工作,因为如果没有代理,它就必须正常工作。希望这能帮到你。
https://stackoverflow.com/questions/29593945
复制相似问题