Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to eject expo project to native code

I eject project from expo with command npm run eject. It generates 2 folders ios and android. I tried to run the project by xcode but it still display this error. Maybe I'm not clear how to run project after eject, can you help me run it. I run some statements to install pod, but cannot work https://github.com/CocoaPods/CocoaPods/issues/2303

enter image description here

like image 672
Hoai Truong Avatar asked Feb 17 '18 16:02

Hoai Truong


People also ask

Does Expo compile to native code?

The tradeoff is that Expo Go does not allow you to add custom native code, you can only use native modules built into the Expo SDK. There are many great libraries available outside of the Expo SDK, and you may even want to build your own native library.

How do I delete Expo project?

Go to https://expo.dev. You'll see a list of projects on the left of the page. If you don't see the one you want to delete in that short list, click on the “All projects” link below that list. You might have to go to the correct page using the “<”, “>” buttons on the bottom right.

Do I need to eject from Expo?

Expo is a toolchain that allows you to quickly get a React Native app up and running without having to use native code in Xcode or Android Studio. The Expo Eject Step is necessary to eject your app to install any missing native dependencies.


1 Answers

If you want to download new project without expo then try run:

react-native init ProjectNameHere

or , If you want to convert your own project without expo then try :

 1. rm -rf node_modules
 2. remove expo dependencies from package.json
 3. npm install
 4. react-native upgrade

(Note:This following step will create new ios and android folder and you have to redo the dependencies. I was struggling with the same issue so I posted my solution)

like image 68
Pratik Khadka Avatar answered Sep 16 '22 13:09

Pratik Khadka