错误提示如下:
Remove untracked files, stash or commit any changes, and try again.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myreact@0.1.0 eject: `react-scripts eject`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myreact@0.1.0 eject script.
npm ERR! This is probably not a problem with npm. There is likely addition
npm ERR! A complete log of this run can be found in:
我的解决方法如下:
运行 git init
运行 `git add .`
然后运行 `git commit -m(am) "eject错误解决"`
最后再运行 `npm run eject`
本文介绍了解决在使用React脚手架时遇到的eject错误的方法。通过初始化git仓库、添加未跟踪文件到暂存区并提交更改,最终成功运行eject命令。
1152

被折叠的 条评论
为什么被折叠?



