版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_25216471/article/details/82870480
在命令后面跟上
--registry=https://registry.npm.taobao.org
查看npm镜像配置
npm config get registry
配置淘宝镜像
npm config set registry 'https://registry.npm.taobao.org/'
配置官方镜像
npm config set registry 'https://registry.npmjs.org/'
出现如下错误sh: 1: node-gyp: Permission denied
用这个命令解决:npm config set unsafe-perm true