环境:window系统,在使用create-react-app命令创建一个项目,运行npm run eject命令暴露配置文件的时候出现了如下提示
NOTE: Create React App 2+ supports TypeScript, Sass, CSS Modules and more wit
t ejecting: https://reactjs.org/blog/2018/10/01/create-react-app-v2.html
? Are you sure you want to eject? This action is permanent. Yes
This git repository has untracked files or uncommitted changes:
package-lock.json
M package.json
M src/App.js
Remove untracked files, stash or commit any changes, and try again.
运行了里面带的start,build命令都会出现以上错误,看到这句话【Remove untracked files, stash or commit any changes, and try again.】翻译【删除未跟踪的文件,隐藏或提交任何更改,然后重试。】有没有一点熟悉,对就是提交git的信息,解决办法如下
先git add .
然后
git commit -m "init"
然后再npm run eject
大功告成!
本文地址:https://www.zhuimengzhu.com/details/217.html
转载地址:暂无
转载说明:转载时请在文首注明来源zhuimengzhu.com 及教程作者,并附本文链接。谢谢各位编辑同仁配合。zhuimengzhu 保留追究相应责任的权利。