一、npm镜像源
//查看使用的镜像源
npm get registry
//全局设置taobao镜像源
npm config set registry http://registry.npmmirror.org
或npm config set registry https://registry.npm.taobao.org
//全局设置npm官方镜像源
npm config set registry http://www.npmjs.org
二、npm安装项目依赖问题
1、我要安装的我项目依赖如下
,直接在项目目录中执行直接执行npm install
心想可能是某依赖的支持版本不对,百度unplugin-element-plus仅支持node14.17.0以上版本,于是用nvm切换node版本为14.17.0,仍然出现上述错误
后面按照这篇文章,不再报错,并且成功安装了项目依赖: