首页 > 其他分享 >webstorm前端vue项目安装依赖包总结

webstorm前端vue项目安装依赖包总结

时间:2024-10-19 15:44:27浏览次数:1  
标签:npm vue -- 前端 webstorm ssl registry install 安装

npm install提示错误信息,与node.js版本有关。以下是用到的一些命令行参数:

1、清除npm的缓存:npm cache clean --force

2、设置npm下载镜像:npm config set registry https://registry.npmmirror.com

如果下载过程中部分包提示联网访问失败404,可以修改package-lock.json文件地址到镜像地址 https://registry.npmmirror.com

3、设置编译不使用ssl,node14版本以上环境编译项目提示错误this[kHandle] = new _Hash(algorithm, xofLen),启动项目前需要设置以下选项,或者添加系统环境变量

SET NODE_OPTIONS=--openssl-legacy-provider  

4、安装过程中如果有依赖冲突,下面选项作用是在安装过程中允许依赖项版本不兼容的情况下强制安装

npm install --legacy-peer-deps 

5、npm install报错npm ERR! code CERT_HAS_EXPIRED:证书过期问题,禁用ssl

npm cache clean --force

npm config set strict-ssl false

标签:npm,vue,--,前端,webstorm,ssl,registry,install,安装
From: https://www.cnblogs.com/sdlz/p/18475968

相关文章