''expo start' or 'npm start' command stuck at ''Starting metro bundler"
I am using react native expo for building mobile app. I followed below steps:-
- expo init myapp
- cd myapp
- expo start
After running above 3 commands everything was working fine few days ago. But from today it gets stuck on "Starting Metro bundler".
It should proceed further to "Building javascript bundle". But It is stuck with "Starting Metro bundler".
Solution 1:[1]
This happened to me because I reset my network settings on my phone earlier today which wiped out my all Wi-Fi connections. So my root cause was simple- my phone just wasn't on the same network as my PC anymore.
If you know you're on the right network, there are more details and potential solutions here: https://github.com/expo/expo-cli/issues/2934 and I think it's important to note that bundling won't start until you click the link from the QR code.
Most likely, it is a network access issue.
Solution 2:[2]
Try to restart your PC. It works for me. I think it happens to me everytime I install new packages while the Metro Bundler is running.
Solution 3:[3]
I had similar problem several times. To me the previous answers are legit and an even simpler measure also worked for me: just tap phone screen to disconnect wifi of my phone and after a few seconds tap again to reconnect wifi, this solved the problem for me.
More info: the error message on my phone was
Uncaught Error: java.net.ConnectException: Failed to connect to /192.168.1.69:19000
My pc and phone are connected via wifi to the same router. Pc runs windows and phone runs Android.
Solution 4:[4]
what I did was restart my computer,
then I shared a network (hotspot) from my computer and connected again the android and iPad, and it worked.
also, connecting your computer to the same router with your devices is also the same, always remember to log in with expo login command
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Kevin |
Solution 3 | letmeask |
Solution 4 | Exploretech_ng |