Node.js 为什么npm安装不起作用?
它是这样开始的,但永远不会继续: [……]/ROLLBAILEDOPTIONAL:动词npm会话c63c949f06e27b29 然后过了一段时间,它失败了。这是错误消息:Node.js 为什么npm安装不起作用?,node.js,reactjs,react-router,npm-install,react-router-dom,Node.js,Reactjs,React Router,Npm Install,React Router Dom,它是这样开始的,但永远不会继续: [……]/ROLLBAILEDOPTIONAL:动词npm会话c63c949f06e27b29 然后过了一段时间,它失败了。这是错误消息: npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to http://registry.npmjs.org/react-router-dom failed, reason: connect ETIMEDOUT 104.16.27
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/react-router-dom failed, reason: connect ETIMEDOUT 104.16.27.35:80
npm ERR! network This is a problem 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! A complete log of this run can be found in:
npm ERR! C:\Users\Eddie\AppData\Roaming\npm-cache\_logs\2020-06-23T07_31_04_992Z-debug.log
此错误是由于代理设置不正确造成的。验证网络代理设置是否正确 否则,请尝试使用以下命令删除代理设置,然后重试 $npm配置rm代理
$npm config rm https proxy您正在运行什么命令?npm有问题,您的计算机的网络有问题,或者您的计算机和npm之间存在问题。@Alvin.Kamau请检查下面的答案,尝试使用vpn可能会有帮助。我已经这样做了,但似乎没有什么不同。