npm error code ETIMEDOUT

1、执行npm install axios --save 报错

D:\code\react\custom-frontend>npm install axios --save
npm error code ETIMEDOUT
npm error errno ETIMEDOUT
npm error network request to https://registry.npmjs.org/axios failed, reason:
npm error network This is a problem related to network connectivity.
npm error network In most cases you are behind a proxy or have bad network settings.
npm error network
npm error network If you are behind a proxy, please make sure that the
npm error network 'proxy' config is set properly.  See: 'npm help config'
npm error A complete log of this run can be found in: D:\sofeware\nodeJS\node_cache\_logs\2024-10-12T02_08_43_165Z-debug-0.log

  解决办法,切换到淘宝镜像

npm config set registry https://registry.npmmirror.com

  

posted @ 2024-10-12 10:19  信铁寒胜  阅读(508)  评论(0)    收藏  举报