文章目录 npm 切换源 npm 切换源 // 1. 清空缓存 npm cache clean --force // 2. 切换新源 npm config set registry https://registry.npmmirror.com // 3. 查看源是否设置成功 npm config get registry // 4. 安装 到这里就可以正常使用npm命令安装需要的工具了。如( npm install -g cnpm )