共计 221 个字符,预计需要花费 1 分钟才能阅读完成。
使用默认地址执行 npm install 很慢,大部分时间是下载失败。所以需要切换国内 npm 源。
检查本地 npm 现有使用的源:
npm config get registry
设置 npm 源为阿里云国内源:
npm config set registry https://registry.npmmirror.com/
如果是临时使用:
npm install --registry=https://registry.npmmirror.com/
原文地址: npm 更换阿里云国内源
正文完