錯誤:
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.
解決:
create-react-app my-react-app
cd my-react-app
git init
git add .
git commit -m 'Saving before ejecting'
npm run eject
按照以上順序就可以正常使用
主要問題是腳手架添加.gitgnore文件,但是卻沒有本地倉庫