doubleyong
管理员
管理员
  • 最后登录2026-05-25
  • 发帖数1198
  • 最爱沙发
  • 喜欢达人
  • 原创写手
  • 社区居民
  • 忠实会员
阅读:5646回复:0

[前端]react 执行npm run eject 报错:This git repository has untracked files or uncommitted changes:

楼主#
更多 发布于:2020-06-30 15:52
react 中,执行npm run eject, 报如下错误:


This git repository has untracked files or uncommitted changes:

Remove untracked files, stash
or commit any changes, and try again. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-app@0.1.0 eject: `react-scripts eject` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-app@0.1.0 eject script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


解决方法:
  1. 修改一下项目
 2. git add .
 3. git commit -m "init"
4. 再npm run eject 就可以了

上面的解决方法,亲测有效


参考:
http://react-china.org/t/create-react-app-npm-run-eject/22051/3
知识需要管理,知识需要分享
游客


返回顶部

公众号

公众号