npm install 报错 ERR code ETIMEDOUT 的解决办法

2023/12/13 npm

# npm install 报错 ERR code ETIMEDOUT 的解决办法

npm 改为 淘宝镜像即可

  1. 查看 npm 镜像设置

    npm config get registry
    
    1
  2. 将 npm 设置为淘宝镜像

    npm config set registry https://registry.npm.taobao.org
    
    1
  3. 再次查看 npm 镜像设置

    npm config get registry
    
    1
  4. 重新 install

    npm install
    
    1
Last Updated: 2025/7/13 10:30:39