运行eject命令会报错
来源:3-1 基础插件安装(1)

半生__素衣
2018-09-13
$ react-scripts eject
? Are you sure you want to eject? This action is permanent. (y/N) (node:46539) ExperimentalWarning: The fs.promises API is experimental
? Are you sure you want to eject? This action is permanent. Yes
This git repository has untracked files or uncommitted changes:
.CF89AA64
.CFUserTextEncoding
.ShadowsocksX-NG/
.ShadowsocksX/
.ZendStudio/
.adobe/
.android/
略。。。。
Remove untracked files, stash or commit any changes, and try again.
error Command failed with exit code 1.
5回答
-
半生__素衣
提问者
2018-11-19
感谢大家。自己发现原因是电脑上还有.git隐藏文件,就在用户目录下,然后和我自己设置的git仓库目录不一样,所以他认为我文件下有很多的内容未提交。因为我用的sourceTree管理,没用过命令行操作,所以之前没遇到问题。之后我把用户目录的.git隐藏文件删除了。就OK了。
00 -
V丶x
2018-11-12
我之前运行 yarn eject报错是因为我习惯写一个新项目会上传到github上面保存每期的代码内容,你出错的原因应该也是类似,你配置了git上传的路径,本地代码有改变但是没有提交你的代码, 你通过命令或者图形管理工具提交下代码就好了, 要是解决请采纳谢谢
00 -
封笺
2018-11-02
先
`git add .`
然后
`git commit -m "init"`
然后再npm run eject
00 -
Coeusz
2018-11-02
我也遇到这样的问题,怎么解决哈
012018-11-19 -
河畔一角
2018-09-28
这个应该不会有问题,直接运行npm run eject
00
相似问题