当前位置:首页 » 《随便一记》 » 正文

npm install(报错)

29 人参与  2024年02月20日 18:51  分类 : 《随便一记》  评论

点击全文阅读


1、npm install 报错(如图)

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

WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @intervolga/optimize-cssnano-plugin@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-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 @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/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 @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/cli-service@3.12.1
npm WARN     node_modules/@vue/cli-service
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @vue/preload-webpack-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/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 @vue/preload-webpack-plugin@1.1.1
npm WARN node_modules/@vue/preload-webpack-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
npm WARN Conflicting peer dependency: webpack@5.83.1
npm WARN node_modules/webpack
npm WARN   peer webpack@">=4.0.0" from @vue/preload-webpack-plugin@1.1.1
npm WARN   node_modules/@vue/preload-webpack-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-photo-preview@1.1.3
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 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


点击全文阅读


本文链接:http://m.zhangshiyu.com/post/69247.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1