Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"react-native eject": Unrecognized command "eject"

Tags:

react-native

I am trying to recreate ios and android folders for my react-native project. As far as I know this is done with the command:

react-native eject

But I get the error:

error Unrecognized command "eject".

I am doing something wrong? How should I recreate android and ios folders?

react-native-cli: 2.0.1

like image 702
miqrc Avatar asked Nov 28 '22 05:11

miqrc


2 Answers

npm i react-native-eject
npm i @react-native-community/cli
react-native eject

will generate the both android and ios folder

like image 74
Edrisa Turay Avatar answered Dec 09 '22 16:12

Edrisa Turay


It did work in 0.59.9. This threw me too this morning after I upgraded to 0.60. Apparently you now have to run react-native upgrade --legacy true. react-native eject was much easier IMHO.

like image 34
edan291 Avatar answered Dec 09 '22 17:12

edan291