React脚手架 npm start运行报错

create-react-app创建应用后使用npm start报错

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Program Files\nodejs\node_cache\_logs\2021-10-13T12_09_20_406Z-debug.log

 出现上述错误可以尝试在项目目录中创建.env文件,在文件中输入下面一行

skip_preflight_check=true

 重新运行 npm start

猜你喜欢

转载自blog.csdn.net/qq_45503196/article/details/120751522