网站后台生成文章很慢,长沙做网站的故事,知名网站服务器,专业网站建设需要多少钱前情提要
使用npm淘宝镜像 https://registry.npm.taobao.org 年前创建的vue3项目npm install 完后没有使用ui写了点杂七杂八的东西#xff0c;年后看到一篇文章有点兴趣#xff0c;掏出来准备试一下#xff0c;本打算安装element-plus 写起来方便点npm install element-plu…前情提要
使用npm淘宝镜像 https://registry.npm.taobao.org 年前创建的vue3项目npm install 完后没有使用ui写了点杂七杂八的东西年后看到一篇文章有点兴趣掏出来准备试一下本打算安装element-plus 写起来方便点npm install element-plus --save 结果就运行后就报错
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: vue/eslint-config-standard6.1.0
npm ERR! Found: eslint-plugin-vue8.7.1
npm ERR! node_modules/eslint-plugin-vue
npm ERR! dev eslint-plugin-vue^8.0.3 from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-vue^7.0.0 from vue/eslint-config-standard6.1.0
npm ERR! node_modules/vue/eslint-config-standard
npm ERR! dev vue/eslint-config-standard^6.1.0 from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint-plugin-vue7.20.0
npm ERR! node_modules/eslint-plugin-vue
npm ERR! peer eslint-plugin-vue^7.0.0 from vue/eslint-config-standard6.1.0
npm ERR! node_modules/vue/eslint-config-standard
npm ERR! dev vue/eslint-config-standard^6.1.0 from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 看这一堆眼花缭乱的其实最有用的就是后几行让我们在原本命令上增加 --force or --legacy-peer-deps
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.也就是npm install element-plus --save --force 跑起来又又报错了.好好好看看报错信息
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: vue/eslint-config-standard6.1.0
npm WARN Found: eslint-plugin-vue8.7.1
npm WARN node_modules/eslint-plugin-vue
npm WARN dev eslint-plugin-vue^8.0.3 from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint-plugin-vue^7.0.0 from vue/eslint-config-standard6.1.0
npm WARN node_modules/vue/eslint-config-standard
npm WARN dev vue/eslint-config-standard^6.1.0 from the root project
npm WARN
npm WARN Conflicting peer dependency: eslint-plugin-vue7.20.0
npm WARN node_modules/eslint-plugin-vue
npm WARN peer eslint-plugin-vue^7.0.0 from vue/eslint-config-standard6.1.0
npm WARN node_modules/vue/eslint-config-standard
npm WARN dev vue/eslint-config-standard^6.1.0 from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: friendly-errors-webpack-plugin1.7.0
npm WARN Found: webpack5.89.0
npm WARN node_modules/webpack
npm WARN peer webpack^4.0.0 || ^5.0.0 from soda/friendly-errors-webpack-plugin1.8.1
npm WARN node_modules/soda/friendly-errors-webpack-plugin
npm WARN soda/friendly-errors-webpack-plugin^1.8.0 from vue/cli-service5.0.8
npm WARN node_modules/vue/cli-service
npm WARN 20 more (vue/cli-plugin-babel, vue/cli-plugin-eslint, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack^2.0.0 || ^3.0.0 || ^4.0.0 from friendly-errors-webpack-plugin1.7.0
npm WARN node_modules/friendly-errors-webpack-plugin
npm WARN friendly-errors-webpack-plugin^1.7.0 from vue-cli-plugin-electron-builder2.1.1
npm WARN node_modules/vue-cli-plugin-electron-builder
npm WARN
npm WARN Conflicting peer dependency: webpack4.47.0
npm WARN node_modules/webpack
npm WARN peer webpack^2.0.0 || ^3.0.0 || ^4.0.0 from friendly-errors-webpack-plugin1.7.0
npm WARN node_modules/friendly-errors-webpack-plugin
npm WARN friendly-errors-webpack-plugin^1.7.0 from vue-cli-plugin-electron-builder2.1.1
npm WARN node_modules/vue-cli-plugin-electron-builder
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/element-plus failed, reason: certificate has expired上面都是WARN不用管重点看ERR他说xxx https://registry.npm.taobao.org/element-plus failed(失败) 这个地址很眼熟啊npm taobao这不就是淘宝镜像吗reason:原因 certificate has expired 证书已过期好家伙搞了半天淘宝镜像过期了
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/element-plus failed, reason: certificate has expired解决
找到根源就好解决了 切换npm镜像源
// 先清除缓存
npm cache clean --force
npm config set registry npm镜像源
开始百度“淘宝镜像过期”找到一篇一个月前热气腾腾的救命文章 npm 淘宝镜像正式到期赶紧更新
换源
npm config set registry https://registry.npmmirror.com重新执行安装成功
npm install element-plus --save --force