当前位置: 首页 > 工具软件 > status-react > 使用案例 >

使用create-react-app脚手架无法运行

狄兴邦
2023-12-01

1.reactstudy@0.1.0 start: react-scripts start

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactstudy@0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactstudy@0.1.0 start script.
Failed to compile.

2.webpack报错

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.0”
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:
D:\node\node_modules\webpack (version: 4.16.2)

##解决方案 在文件添加.env文件,内容为SKIP_PREFLIGHT_CHECK=true

 类似资料: