npm ERR!
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了npm ERR!相关的知识,希望对你有一定的参考价值。
FAILED! => {"changed": false, "cmd": "/usr/bin/npm install --registry https://registry.npm.taobao.org", "msg": "npm ERR! Linux 3.10.0-514.el7.x86_64\nnpm ERR! argv \"/usr/bin/node\" \"/usr/bin/npm\" \"install\" \"--registry\" \"https://registry.npm.taobao.org\"\nnpm ERR! node v6.12.2\nnpm ERR! npm v3.10.10\nnpm ERR! code ENOTFOUND\nnpm ERR! errno ENOTFOUND\nnpm ERR! syscall getaddrinfo\n\nnpm ERR! network getaddrinfo ENOTFOUND registry.npm.taobao.org registry.npm.taobao.org:443\nnpm ERR! network This is most likely not a problem with npm itself\nnpm ERR! network and is related to network connectivity.\nnpm ERR! network In most cases you are behind a proxy or have bad network settings.\nnpm ERR! network \nnpm ERR! network If you are behind a proxy, please make sure that the\nnpm ERR! network 'proxy' config is set properly. See: 'npm help config'\n\nnpm ERR! Please include the following file with any support request:\nnpm ERR!大概意思是:你的系统运行环境里可能有代理的形式上网。
解决办法:
设置npm代理即可:
num代理设置
npm config set proxy http://用户名:密码@代理ip:端口号
npm config set https-proxy http://用户名:密码@代理ip:端口号
如果代理没有用户名密码:
npm config set proxy http://代理ip:端口号
npm config set https-proxy http://代理ip:端口号
当设置代理的时候,要去掉默认的npm:
npm config set proxy null
以上是关于npm ERR!的主要内容,如果未能解决你的问题,请参考以下文章
npm ERR! code ENOENT npm ERR! syscall open npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@
npm ERR! code ECONNRESET npm ERR! errno ECONNRESET npm ERR! network request to http://registry.npm.t
npm ERR! cb() never called! npm ERR! <https://npm.community>
npm install 报错(npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path D: ode.jsodejs)
输入npm install 报错npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.13.1 postinstall: `no