I have created app using expo init and then trying to eject it to bare react native project. However, when I am running “expo eject” command, I don’t get any option to select type of project to which I want to eject. I just get option to continue (Y/N) and then it asks me to set a name for my android and ios project.
What version of expo-cli
are you using? The default is to eject to bare, since Expokit was officially deprecated in our last SDK release
I got the same problem as shahnihal.alwani but automatically doing eject after pick the option to continue(Y/N). My expo SDK is 42.0.1
@egbertgan, this is as it should be. These days there is only one option. ExpoKit is no longer.
e.g. this is what it looks like if I create a new app (which I will call “app-to-eject” here):
$ expo init app-to-eject
✔ Choose a template: › blank a minimal app as clean as an empty canvas
Downloading and extracting project files.
🧶 Using Yarn to install packages. Pass --npm to use npm instead.
Installing JavaScript dependencies.
✅ Your project is ready!
To run your project, navigate to the directory and run one of the following yarn commands.
- cd app-to-eject
- yarn start # you can open iOS, Android, or web from here, or run them directly with the commands below.
- yarn android
- yarn ios # requires an iOS device or macOS for access to an iOS simulator
- yarn web
And then eject it:
$ cd app-to-eject/
$ expo eject
Your git working tree is clean
To revert the changes after this command completes, you can run the following:
git clean --force && git reset --hard
📝 Android package Learn more.
✔ What would you like your Android package name to be? … com.wodin.apptoeject
📝 iOS Bundle Identifier Learn more.
✔ What would you like your iOS bundle identifier to be? … com.wodin.apptoeject
Creating native project directories (./ios and ./android) and updating .gitignore
Adding Metro bundler config
Updating your package.json scripts, dependencies, and main file
› Removed "main": "node_modules/expo/AppEntry.js" from package.json because we recommend using index.js as main instead
🧶 Using Yarn to install packages. Pass --npm to use npm instead.
Installing JavaScript dependencies
Config syncing
Installing CocoaPods...
➡️ Next steps
› 🍫 When CocoaPods is installed, initialize the project workspace: npx pod-install
› 💡 You may want to run npx @react-native-community/cli doctor to help install any tools that your app may need to run your native projects.
› 🔑 Download your Android keystore (if you're not sure if you need to, just run the command and see): expo fetch:android:keystore
› 📁 The property assetBundlePatterns does not have the same effect in the bare workflow.
Learn more.
☑️ When you are ready to run your project
To compile and run your project in development, execute one of the following commands:
› yarn ios
› yarn android
› yarn web
expo diagnostics
shows the workflow:
$ expo diagnostics
[…]
Expo Workflow: bare
ooh, so should I use expo init app-to-eject instead of expo eject? And as I read some of the forums, the ios folder won’t be generated since I am on Windows right? so does using expo init app-to-eject generate both android and ios ? thank you.
expo init app-name
creates a new app called “app-name”.
You should use expo eject
as I did further down in that output. I’ll edit my comment to make ot clearer.
I believe you won’t get the ios directory.
But perhaps it would be best to step back and ask why you need to eject?