Sihem Hcine
Sihem Hcine

Reputation: 1129

Why Expo can not load the project in react-native app?

I'm trying to create my first react-native app. I installed expo XDE then I create a new project in this way :

create-react-native-app  firstProj 

Then I open it in expo XDE and in terminal by exp firstProj

Starting expo error

But I get this warning ; And this is what is displayed in the emulator :

error in emulator

Any help is appreciated.

Upvotes: 0

Views: 7014

Answers (4)

Hamza Regardless
Hamza Regardless

Reputation: 83

In My Case, I did this. by Using Expo.

  1. Just make sure the laptop and mobile connection with the same network.
  2. Make sure that you are selected Lan on the expo web tab.
  3. Stop the npm Server Running.
  4. Close the App on Mobile Also.
  5. Then Start npm Again.
  6. Now Scan the QR Code if the project is not listed up in the expo recent open project app already.
  7. Or click on the already available in recent opens project on the expo.

Note if Still not working then try same after clearing the recent open in expo app.

I knew that this answer is too late but May it help someone.

Upvotes: 0

Roman
Roman

Reputation: 21873

It helped the following in my case:

  1. Install Genymotion with VirtualBox
  2. SignUp at Genymotion site
  3. Run Genymotion software and !!!SignIn
  4. Close npm prompt program with project and start it again
  5. npm start (in the npm promt window in the project directory)
  6. Close and start Expo app, scan barcode

I noted that when my application runs successfully IpV addresses are identical

exp://10.0.0.124:19000   and
ipconfig -> IPv4 Address. . . . . . . . . . . : 10.0.0.124

Upvotes: 0

CodingMonkey
CodingMonkey

Reputation: 135

  1. Click the setting button in the left top, then change the "Host" to "LAN"
  2. Restart your project

Upvotes: 1

Jeffrey
Jeffrey

Reputation: 4650

Follow the below steps to create a new expo app from command line:

 create-react-native-app my-app
 cd my-app/
 npm start
 npm run ios / npm run android

In a alternate way you can try Expo XDE interface to create a app and run in your device. Here is a official document for creating and sharing your app across your device. If you are interested with their CLI you can follow the below steps

npm install exp --global
exp init your-project-name
cd your-project-name
exp start

Please check whether you have missed any of the steps from the above, it might help you to fix the issue. You might have missed exp start command.

Upvotes: 0

Related Questions