1.查看当前源
npm
yarn config get registry
2、切换为淘宝源
yarn
npm config set registry https://registry.npm.taobao.org
3、或者切换为自带的
npm
yarn config set registry https://registry.yarnpkg.com
4、删除 node_modules
安装 rimraf
npm install rimraf -g
使用命令删除
rimraf node_modules
网友评论