跟这狼二弟走,让你使用最简单的方式解决问题
PS E:\08react项目\project\guiguzhipin> npm start
> guiguzhipin@0.1.0 start E:\08react项目\project\guiguzhipin
> react-app-rewired start
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! guiguzhipin@0.1.0 start: `react-app-rewired start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the guiguzhipin@0.1.0 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:\node\node_cache\_logs\2021-05-12T07_50_50_093Z-debug.log
主要原因:
“react-app-rewired” 他的新版已经摒弃了一些功能,只要把它卸载,安装一个2.0版本即可
卸载命令:
npm i react-app-rewired@2.0.2-next.0
安装命令:
npm uninstall react-app-rewired
安装完成后,直接执行: npm start 即可
狼二弟只追求简单明了,解决问题。