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
原文地址:http://blog.51cto.com/506554897/2068159