"Building Javascript Bundle" very slow to start Expo on Android

Asked

Viewed 89 times

1

In React Native, following the official documentation (step by step) I was able to install the dependencies and everything I needed to run my first project. I created the directory using expo init myApp, and soon after I started with expo start, until then all right, however, every time I turn on my pc and will connect to the project for the first time (using the QR code) get the following on my terminal:

Building JavaScript bundle [===============================            ] 73%

It takes about 20 minutes to complete and my smartphone screen looks like this:

inserir a descrição da imagem aqui

After the Bundle Javascript Building is completed in 100% my app runs normally.

Doubts:

  1. It is normal this delay to start the app for the first time whenever I turn on the pc?

  2. If not, how to bypass this failure?

1 answer

0


This slowness can happen yes. Reading a question from Soen (React Native Expo building very slowly) and based on past experiences, I say it may have to do with your computer’s capacity or with the Internet connection.

As suggested in Soen’s question, I bring in free translation:

Try using Expo on an emulator on your computer and make sure is taking as long as on your mobile:

  • If you’re faster than on your phone, then check the Internet connection on the phone you’re testing on
  • If you are as slow as your mobile phone, then try removing the node_modules and reinstall dependencies with npm install or yarn.

I guess I’ve had problems with that in a slow machine, where this procedure often failed when I tried to use a app.config.js (see an Issue about it), but by switching to a more "powerful" machine, everything worked normally.


On the screen turn white while charging, that’s exactly what it means: it’s loading the Bundle and then has nothing to display yet, so the app only works when it reaches 100%.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.