2017-08-14 78 views
0

我想退出我的反应的应用程序,所以我用代码:npm run eject在cmmand line.But它告诉我,我failed.And这些都是日志:如何在我的反应应用程序中运行弹出?

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 additional 
logging output above. 

npm ERR! A complete log of this run can be found in: 
npm ERR!  C:\Users\Pigpigever\AppData\Roaming\npm-cache\_logs\2017-08- 
14T09_03_14_398Z-debug.log 

谁能告诉我该怎么办?

+2

'删除未跟踪文件,藏匿或提交任何changes' – TryingToImprove

回答

1

该错误消息不是很清楚(in fact, there's an open issue on GitHub to improve it)。

create-react-appprevents you from ejecting your app without first having committed any outstanding changes to Git - 这是如此,如果弹出破坏事情(或者如果你只是决定你犯了一个错误,想回去),你可以恢复你的项目是如何以前。

由于错误消息说 - 让命令工作,你需要:

  • 添加你要保持你的Git仓库任何未跟踪文件。
  • 删除所有不想保留的未跟踪文件(通过删除它们或将其添加到您的.gitignore)。
  • 提交您的更改,或者如果您希望稍后再提交,请将其保存。
0

您可以使用:

git add . 
git commit -am "Save before ejecting" 

再次尝试

相关问题