我们在集成终端输入命令npm install的时候报错:
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz failed, reason:
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'
当时这个项目搭建人在搭建的时候node版本为20.9.0,
我看了我这边的node版本并没有错,所以不是版本的问题
后来查询资料说使用淘宝镜像就可以了,所以我就试了试结果成功了!
以下命令:npm config set registry https://registry.npm.taobao.org