使用create-react-app项目后,npm run start 报错:
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"webpack": "4.41.5"
Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree:
C:\Users\xxx\node_modules\webpack (version: 4.41.2)
(version: 3.3.1) Manually installing incompatible versions is known to cause hard-to-debug issues.
解决:全局卸载webpack后,重新安装指定版本
npm uninstall webpack
npm install webpack@4.41.5