无法运行npm install -g create-react-app

时间:2017-04-03 02:39:22

标签: reactjs

无法运行npm install -g create-react-app,它会产生如下错误: 有什么建议吗?感谢

C:\Learning\ReactJS\basic-react>npm install -g create-react-app
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\node.exe" "C:\\node_modules\\npm\\bin\\npm-cli.js" "install"
"-g" "create-react-app"
npm ERR! node v4.4.4
npm ERR! npm  v2.15.1
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo

npm ERR! network getaddrinfo ENOTFOUND proxyaddress proxyaddress: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 settin
gs.
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:\Learning\ReactJS\basic-react\npm-debug.log

1 个答案:

答案 0 :(得分:0)

您似乎在代理后面,需要设置NPM才能使用正确的代理设置。也许可以试试这个指南:https://jjasonclark.com/how-to-setup-node-behind-web-proxy/