首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >命令显示了太多错误消息。

命令显示了太多错误消息。
EN

Stack Overflow用户
提问于 2022-10-06 12:34:37
回答 1查看 48关注 0票数 -1

我需要通过运行以下命令在我的项目中安装节点:

代码语言:javascript
复制
npm install

但运行此命令后,我将得到以下错误消息:

代码语言:javascript
复制
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: browser-sync-webpack-plugin@2.0.1
npm ERR! Found: webpack@4.46.0
npm ERR! node_modules/webpack
npm ERR!   peer webpack@"^4.0.0" from @intervolga/optimize-cssnano-plugin@1.0.6
npm ERR!   node_modules/@intervolga/optimize-cssnano-plugin
npm ERR!     @intervolga/optimize-cssnano-plugin@"^1.0.5" from @vue/cli-service@4.5.17
npm ERR!     node_modules/@vue/cli-service
npm ERR!       dev @vue/cli-service@"~4.5.13" from the root project
npm ERR!       5 more (@vue/cli-plugin-babel, @vue/cli-plugin-eslint, ...)
npm ERR!   peer webpack@"^4.0.0 || ^5.0.0" from @soda/friendly-errors-webpack-plugin@1.8.1
npm ERR!   node_modules/@soda/friendly-errors-webpack-plugin
npm ERR!     @soda/friendly-errors-webpack-plugin@"^1.7.1" from @vue/cli-service@4.5.17
npm ERR!     node_modules/@vue/cli-service
npm ERR!       dev @vue/cli-service@"~4.5.13" from the root project
npm ERR!       5 more (@vue/cli-plugin-babel, @vue/cli-plugin-eslint, ...)
npm ERR!   28 more (@vue/cli-plugin-babel, @vue/cli-plugin-eslint, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^1 || ^2 || ^3" from browser-sync-webpack-plugin@2.0.1
npm ERR! node_modules/browser-sync-webpack-plugin
npm ERR!   browser-sync-webpack-plugin@"2.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR!   peer webpack@"^1 || ^2 || ^3" from browser-sync-webpack-plugin@2.0.1
npm ERR!   node_modules/browser-sync-webpack-plugin
npm ERR!     browser-sync-webpack-plugin@"2.0.1" 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! See /Users/hello/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/hello/.npm/_logs/2022-10-06T12_31_49_438Z-debug-0.log

请您告诉我为什么会显示这条错误信息,以及如何解决它?

EN

回答 1

Stack Overflow用户

发布于 2022-10-06 13:55:01

运行npm install --legacy-peer-deps

here已经回答了这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73973894

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档