1、问题概述?
执行npm install命令的时候报错如下:
tangxiaochun@tangxiaochundeMacBook-Pro stf % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: stf@3.4.1
npm ERR! Found: webpack@1.15.0
npm ERR! node_modules/webpack
npm ERR! dev webpack@"^1.12.11" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.0.0" from webpack-dev-server@3.1.11
npm ERR! node_modules/webpack-dev-server
npm ERR! dev webpack-dev-server@"^3.1.11" 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:
npm ERR! /Users/tangxiaochun/.npm/_logs/2024-02-28T05_19_31_0