npm 设置镜像 :npm config set registry https://registry.npmmirror.com
查看是否安装成功:npm config get registry
yarn 类似
npm 安装:npm install
npm 清除缓存 npm cache clean --force
npm 查看当前设置 npm config list
npm 设置代理:
npm config set proxy 127.0.0.1:7890
npm config set https-proxy 127.0.0.1:7890
npm 取消代理
npm config delete proxy
npm config delete https-proxy
npm 代理信息:
npm config set proxy http://127.0.0.1:7890
npm config set https-proxy http://127.0.0.1:7890
错误处理:
1. While resolving: ruoyi@3.8.7 npm ERR! Found: html-webpack-plugin@5.6.0 npm ERR! node_modules/html-webpack-plugin npm ERR! dev html-webpack-plugin@"^5.6.0" from the root project:
解决: npm install --legacy-peer-deps
参考: https://blog.youkuaiyun.com/qq_42913476/article/details/127984854