react中运行npm run eject报错问题

错误提示如下:

Remove untracked files, stash or commit any changes, and try again.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] eject: `react-scripts eject`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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,react中运行npm,run,eject报错,npm,run,eject)