1、npm install 报错如图

2、使用npm install –legacy-peerdeps

WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @intervolga/optimize-cssnanoplugin@1.0.6
npm WARN Found: webpack@3.12.0
npm WARN node_modules/webpack
npm WARN   peer webpack@”^2.0.0 || ^3.0.0 || ^4.0.0″ from @soda/friendly-errorswebpackplugin@1.7.1
npm WARN   node_modules/@soda/friendly-errors-webpackplugin
npm WARN     @soda/friendly-errors-webpackplugin@”^1.7.1″ from @vue/cliservice@3.12.1
npm WARN     node_modules/@vue/cliservice
npm WARN   12 more (babelloader, eslintloader, …)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer webpack@”^4.0.0″ from @intervolga/optimize-cssnano-plugin@1.0.6
npm WARN node_modules/@intervolga/optimize-cssnano-plugin
npm WARN   @intervolga/optimize-cssnano-plugin@”^1.0.5″ from @vue/cliservice@3.12.1
npm WARN   node_modules/@vue/cliservice
npm WARN 
npm WARN Conflicting peer dependency: webpack@4.46.0
npm WARN node_modules/webpack
npm WARN   peer webpack@”^4.0.0″ from @intervolga/optimize-cssnano-plugin@1.0.6
npm WARN   node_modules/@intervolga/optimize-cssnano-plugin
npm WARN     @intervolga/optimize-cssnano-plugin@”^1.0.5″ from @vue/cliservice@3.12.1
npm WARN     node_modules/@vue/cliservice
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @vue/preloadwebpack-plugin@1.1.1
npm WARN Found: webpack@3.12.0
npm WARN node_modules/webpack
npm WARN   peer webpack@”^2.0.0 || ^3.0.0 || ^4.0.0″ from @soda/friendly-errors-webpack-plugin@1.7.1
npm WARN   node_modules/@soda/friendly-errors-webpack-plugin
npm WARN     @soda/friendly-errors-webpack-plugin@”^1.7.1″ from @vue/cliservice@3.12.1
npm WARN     node_modules/@vue/cli-service
npm WARN   12 more (babel-loader, eslint-loader, …)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack@”>=4.0.0″ from @vue/preloadwebpack-plugin@1.1.1
npm WARN node_modules/@vue/preloadwebpack-plugin
npm WARN   @vue/preloadwebpack-plugin@”^1.1.0″ from @vue/cli-service@3.12.1
npm WARN   node_modules/@vue/cli-service
npm WARN
npm WARN Conflicting peer dependency: webpack@5.83.1
npm WARN node_modules/webpack
npm WARN   peer webpack@”>=4.0.0″ from @vue/preloadwebpack-plugin@1.1.1
npm WARN   node_modules/@vue/preloadwebpack-plugin
npm WARN     @vue/preload-webpack-plugin@”^1.1.0″ from @vue/cli-service@3.12.1
npm WARN     node_modules/@vue/cli-service
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: cache-loader@2.0.1
npm WARN Found: webpack@3.12.0
npm WARN node_modules/webpack
npm WARN   peer webpack@”^2.0.0 || ^3.0.0 || ^4.0.0″ from @soda/friendly-errors-webpack-plugin@1.7.1
npm WARN   node_modules/@soda/friendly-errors-webpack-plugin
npm WARN     @soda/friendly-errors-webpack-plugin@”^1.7.1″ from @vue/cli-service@3.12.1
npm WARN     node_modules/@vue/cli-service
npm WARN   12 more (babel-loader, eslint-loader, …)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack@”^4.0.0″ from cache-loader@2.0.1
npm WARN node_modules/cache-loader
npm WARN   cache-loader@”^2.0.1″ from @vue/cli-service@3.12.1
npm WARN   node_modules/@vue/cli-service
npm WARN
npm WARN Conflicting peer dependency: webpack@4.46.0
npm WARN node_modules/webpack
npm WARN   peer webpack@”^4.0.0″ from cache-loader@2.0.1
npm WARN   node_modules/cache-loader
npm WARN     cache-loader@”^2.0.1″ from @vue/cli-service@3.12.1
npm WARN     node_modules/@vue/cli-service
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: compression-webpack-plugin@3.1.0
npm ERR! Found: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR!   peer webpack@”^2.0.0 || ^3.0.0 || ^4.0.0″ from @soda/friendly-errors-webpack-plugin@1.7.1
npm ERR!   node_modules/@soda/friendly-errors-webpack-plugin
npm ERR!     @soda/friendly-errors-webpack-plugin@”^1.7.1″ from @vue/cli-service@3.12.1
npm ERR!     node_modules/@vue/cli-service
npm ERR!       dev @vue/cli-service@”^3.3.0″ from the root project
npm ERR!   peer webpack@”2 || 3 || 4″ from babel-loader@7.1.5
npm ERR!   node_modules/babel-loader
npm ERR!     babel-loader@”^7.1.2″ from vue-photopreview@1.1.3
npm ERR!     node_modules/vue-photopreview
npm ERR!       vue-photopreview@”^1.1.3″ from the root project
npm ERR!   11 more (eslint-loader, extract-text-webpack-plugin, …)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@”^4.3.0 || ^5.0.0″ from compression-webpack-plugin@3.1.0
npm ERR! node_modules/compression-webpack-plugin
npm ERR!   dev compression-webpack-plugin@”^3.1.0″ from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack@5.83.1
npm ERR! node_modules/webpack
npm ERR!   peer webpack@”^4.3.0 || ^5.0.0″ from compression-webpack-plugin@3.1.0
npm ERR!   node_modules/compression-webpack-plugin
npm ERR!     dev compression-webpack-plugin@”^3.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!
npm ERR! 
npm ERR! For a full report see: 

2、使用npm install –legacy-peer-deps

原文地址:https://blog.csdn.net/weixin_46166771/article/details/130812290

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_8563.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注