节点问题:NPM给了我各种错误

时间:2015-11-07 12:19:07

标签: node.js npm

这是我每次都得到的错误:

npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express" "-g"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.6
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! Please include the following file with any support request:
npm ERR!     C:\Users\uche\npm-debug.log

enter image description here

2 个答案:

答案 0 :(得分:0)

此错误主要是由于网络错误引起的。

确保您的互联网连接正常,防火墙,VPN等没有任何限制。

答案 1 :(得分:0)

您可以通过运行此命令来解决此问题

    resp = requests.get('https://api.ipify.org?format=json', timeout=5)
    j = json.loads(resp.content)
    print('New IP: '+ j['ip'])