-1

I need to install node in my project by running this command:

npm install

But after run this command I am getting this error message:

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

Would you please tell me why it's showing this error message and how can I solve it ?

Shibbir
  • 1,963
  • 2
  • 25
  • 48

1 Answers1

0

Run npm install --legacy-peer-deps

This question has already been answered here.

rantao
  • 1,621
  • 4
  • 14
  • 34