npm install时报错npm ERR! code ETIMEDOUT

npm install时报错npm ERR! code ETIMEDOUT,可以先查看npm的配置registry

#查看npm镜像设置
npm config get registry

官方默认镜像
https://registry.npmjs.org

淘宝镜像源
https://registry.npmmirror.com
https://registry.npm.taobao.org

腾讯云镜像源
http://mirrors.cloud.tencent.com/npm/

华为云镜像源
https://mirrors.huaweicloud.com/repository/npm/

 修改一下npm的镜像设置

npm config set registry https://registry.npm.taobao.org

也可以改成其他的国内镜像源

你可能感兴趣的:(npm,前端,node.js)