一、安装
报错:cnpm install element-plus --save
× Install fail! Error: GET https://registry.npmmirror.com/elementplus response 404 status
解决:加参数指定官方源(先清理缓存)
cnpm install element-plus --registry=https://registry.npmjs.org
二、更新
1、清除npm缓存
npm cache verify
设置镜像源(taobao)
npm config set registry https://registry.npmmirror.com
查看镜像源是否设置成功
npm config get registry
2、下载
cnpm install element-plus@latest
3、查看版本
cnpm show element-plus version
4、删除node_modules(package-lock.json)
5、重新安装依赖
cnpm i