Create-react-native-app: Convert Expo project to Original RN App

Created on 25 Jun 2017  路  6Comments  路  Source: expo/create-react-native-app

I did yarn run eject to eject but it gave me this warning

Warning! We found at least one file where your project imports the Expo SDK

I know I have some modules which use Expo API like this -

await Expo.Font.loadAsync({
      Roboto: require('native-base/Fonts/Roboto.ttf'),
      Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
    });

Now I want to convert this to React Native Components so that I can eject without any errors so that I get
index.android.js & index.ios.js in the root folder like we do while using react-native init example

Most helpful comment

After 4 hours, I got the answer.. :yum:
Had to install exp using npm i -g exp & then used exp detach to detach the project
Also I added some fields in app.json for it to work as follows

{
  "expo": {
    "name": "Project",
    "slug": "project",
    "sdkVersion": "18.0.0",
    "privacy": "public",
    "android": {
      "package": "com.example.project"
    }
 }
}

Docs are given here

SideNote: It doesn't create the folder structure like when done using react-native init... It creates android & ios folders respectively.

All 6 comments

After 4 hours, I got the answer.. :yum:
Had to install exp using npm i -g exp & then used exp detach to detach the project
Also I added some fields in app.json for it to work as follows

{
  "expo": {
    "name": "Project",
    "slug": "project",
    "sdkVersion": "18.0.0",
    "privacy": "public",
    "android": {
      "package": "com.example.project"
    }
 }
}

Docs are given here

SideNote: It doesn't create the folder structure like when done using react-native init... It creates android & ios folders respectively.

IS your detach sucess how you able build apk after detach?
Can we run it using react-native run-android?

IS your detach sucess how you able build apk after detach?

Yep detach was successful. Follow this for building apk after detach.

Can we run it using react-native run-android?

Not sure what you're saying. But if I remember, npm start will do the job.

Docs link is not working ...
404
This page could not be found.

Try again

@deadcoder0904 , what about size of apk? like its normal expo size apk of 25 mb or less

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noelweichbrodt picture noelweichbrodt  路  3Comments

mwq27 picture mwq27  路  5Comments

witbybit picture witbybit  路  4Comments

JackWReid picture JackWReid  路  4Comments

kinergy picture kinergy  路  4Comments