首先,贴一下我的错误,在使用create-react-app创建一个项目之后,我用vscode打开这个项目,并且在终端输入命令npm start之后,出现报错的情况:
C:\Users\Lenovo\Desktop\react-demo
react-scripts 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.29.6"
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\23902\node_modules\webpack (version: 4.30.0)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check