npm install(报错)

1、npm install 报错(如图)

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

npm install(报错)_第1张图片

npm install(报错)_第2张图片WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @intervolga/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/webpack
npm WARN   peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from @soda/[email protected]
npm WARN   node_modules/@soda/friendly-errors-webpack-plugin
npm WARN     @soda/friendly-errors-webpack-plugin@"^1.7.1" from @vue/[email protected]
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 @intervolga/[email protected]
npm WARN node_modules/@intervolga/optimize-cssnano-plugin
npm WARN   @intervolga/optimize-cssnano-plugin@"^1.0.5" from @vue/[email protected]
npm WARN   node_modules/@vue/cli-service
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/webpack
npm WARN   peer webpack@"^4.0.0" from @intervolga/[email protected]
npm WARN   node_modules/@intervolga/optimize-cssnano-plugin
npm WARN     @intervolga/optimize-cssnano-plugin@"^1.0.5" from @vue/[email protected]
npm WARN     node_modules/@vue/cli-service
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @vue/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/webpack
npm WARN   peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from @soda/[email protected]
npm WARN   node_modules/@soda/friendly-errors-webpack-plugin
npm WARN     @soda/friendly-errors-webpack-plugin@"^1.7.1" from @vue/[email protected]
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/[email protected]
npm WARN node_modules/@vue/preload-webpack-plugin
npm WARN   @vue/preload-webpack-plugin@"^1.1.0" from @vue/[email protected]
npm WARN   node_modules/@vue/cli-service
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/webpack
npm WARN   peer webpack@">=4.0.0" from @vue/[email protected]
npm WARN   node_modules/@vue/preload-webpack-plugin
npm WARN     @vue/preload-webpack-plugin@"^1.1.0" from @vue/[email protected]
npm WARN     node_modules/@vue/cli-service
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/webpack
npm WARN   peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from @soda/[email protected]
npm WARN   node_modules/@soda/friendly-errors-webpack-plugin
npm WARN     @soda/friendly-errors-webpack-plugin@"^1.7.1" from @vue/[email protected]
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 [email protected]
npm WARN node_modules/cache-loader
npm WARN   cache-loader@"^2.0.1" from @vue/[email protected]
npm WARN   node_modules/@vue/cli-service
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/webpack
npm WARN   peer webpack@"^4.0.0" from [email protected]
npm WARN   node_modules/cache-loader
npm WARN     cache-loader@"^2.0.1" from @vue/[email protected]
npm WARN     node_modules/@vue/cli-service
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/webpack
npm ERR!   peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from @soda/[email protected]
npm ERR!   node_modules/@soda/friendly-errors-webpack-plugin
npm ERR!     @soda/friendly-errors-webpack-plugin@"^1.7.1" from @vue/[email protected]
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 [email protected]
npm ERR!   node_modules/babel-loader
npm ERR!     babel-loader@"^7.1.2" from [email protected]
npm ERR!     node_modules/vue-photo-preview
npm ERR!       vue-photo-preview@"^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 [email protected]
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: [email protected]
npm ERR! node_modules/webpack
npm ERR!   peer webpack@"^4.3.0 || ^5.0.0" from [email protected]
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

你可能感兴趣的:(npm,前端,javascript)