在學習react.js,需要安裝node.js,使用npm,當你的瀏覽器設置有代理時,可參考如下操作解決,本人踩過的坑(花費一下午解決)
具體安裝可參考別人的博客:https://blog.csdn.net/quangezai666/article/details/77408104
具體錯誤如下:
request to https://registry.npm.taobao.org/cnpm failed, reason: getaddrinfo ENOTFOUND registry.npm.taobao.org registry.npm.taobao.org:443
This is a problem related to network connectivity.
If you are behind a proxy, please make sure that the
'proxy' config is set properly. See: 'npm help config'
原因說的就是你的代理服務有問題,網絡上很多關於設置阿里的npm,但是這和你的瀏覽器代理無關
以下解決步驟參考
1.將瀏覽器的代理找出來copy
2.通過cmd命令設置
例如:
npm config set proxy http://192.168.0.2:80880
npm config set https-proxy http://192.168.0.2:80880
3.驗證