我不能运行 yarn eject 出现这种情况怎么办啊

来源:3-1 基础插件安装(1)

ailisideriji

2018-12-23

apple@apple-PC MINGW64 ~/imoocmanager (master)
$ yarn eject
yarn run v1.12.3
$ react-scripts eject
? Are you sure you want to eject? This action is permanent. (y/N) y
? Are you sure you want to eject? This action is permanent. Yes
This git repository has untracked files or uncommitted changes:

package.json
M src/App.js
M src/index.js
src/page/
yarn.lock

Remove untracked files, stash or commit any changes, and try again.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm and.

写回答

1回答

Singularity奇点

2019-01-05

原因是生成的文件没有加入到版本库里,两个解决办法:

  • 最简单:作为练习可以不用管git,直接删掉 .git文件夹 在terminal输入

rm -rf .git
  • 推荐: 养成良好的git习惯,把所有的文件变化都加入的版本库里

git add .
git commit -m "Initializtion"



1
1
23届毕业生
多谢老板
2019-07-21
共1条回复

React全家桶+AntD共享单车后台管理系统开发

React全家桶+AntD框架+大量前沿技术

1142 学习 · 495 问题

查看课程