vue 命令

# 查看自己的镜像
npm config get registry

# 更换npm 镜像(以淘宝镜像为例)
npm config set registry http://registry.npm.taobao.org/

#还原
npm config set registry https://registry.npmjs.org/
# 删除 node_modules目录
rm -rf node_modules/

# 清空缓存
npm cache clean

#重新安装
npm install
# 清除 npm 缓存
npm cache clean --force

评论

暂无评论