gpt4 book ai didi

node.js - 如何在我的 react 应用程序中运行弹出?

转载 作者:搜寻专家 更新时间:2023-11-01 00:12:24 24 4
gpt4 key购买 nike

我想弹出我的 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! todoevents@0.1.0 eject: `react-scripts eject`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todoevents@0.1.0 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

谁能告诉我该怎么做?

最佳答案

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

create-react-app prevents you from ejecting your app without first having committed any outstanding changes to Git - 这样一来,如果弹出破坏了东西(或者如果您只是决定犯了一个错误并想返回),您就可以将项目恢复到以前的状态。

如错误消息所述 - 要使命令正常工作,您需要:

  • 将您想要保留的所有未跟踪文件添加到您的 Git 存储库。
  • 删除您不想保留的任何未跟踪文件(通过删除它们或将它们添加到您的 .gitignore)。
  • 提交您的更改,或者如果您想稍后提交更改,则将它们存储起来。

关于node.js - 如何在我的 react 应用程序中运行弹出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45671057/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com