2017-07-16 27 views
1

我是新的reactnative,我已成功彈出本機構建,並且在reactnative之後發現有些事情需要調整,所以我想再次編輯js並再次彈出。退出彈出後無法再彈出本機

但我發現它不能夠再次使用npm run eject彈出,並顯示以下錯誤:

npm run eject 
npm ERR! Darwin 16.6.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "eject" 
npm ERR! node v6.11.0 
npm ERR! npm v3.10.10 

npm ERR! missing script: eject 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/xxx/work/reactnative/maoquote/npm-debug.log 

我在項目文件夾檢查package.json,並且eject塊丟失,但我敢肯定在我第一次彈出這個項目之前,eject塊已經存在了,看起來框架在彈出之後已經移除了它?

不知道爲什麼reactnative不允許我再次彈出,有沒有什麼辦法可以做到這一點?

我使用reactnative version 0.45

的感謝!

回答

1

您是否使用create-react-native-app創建了項目?不幸的是,彈出是不可逆的,你應該使用你的版本控制手動回滾。

Ejecting

"Ejecting" is the process of setting up your own custom builds for your CRNA app. It can be necessary to do if you have needs that aren't covered by CRNA, but please note that aside from the use of version control systems (git, hg, etc.) it is not reversible.

+0

感謝,使用版本控制是一個很好的提示,他們應該允許用戶雖然彈出多的時間,也許這是正在開發中:d – armnotstrong