stuck on "Starting packager..."
See original GitHub issueDescription
When I start a new project and run yarn run ios
it opens the simulator. But as soon as the second or third time I try to use yarn run ios
again while working on the app it hangs on Starting packager...
for over 5 minutes.
Expected Behavior
Run the ios simulator (again)
Observed Behavior
I’ve started over 4 times now and it always has a problem at a different, seemingly random stage in me building the app when I try to use yarn run ios
. It works and works and works and then eventually it stops working and I have to start over again. IT doesn’t seem to be a consistant point in which things stop working. I was using npm to install and run processes but now I’m using yarn. Both have the same issue. I’m following instructions in this guide by the way, both as-is and with yarn instead of npm. Even when I revert to my git history when it was working, and rm -rf node_modules && yarn install
/ npm install
the problem persists
If there’s an error message, please paste the full terminal output and error message in this code block:
Error text goes here!
Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts
: react-native-scripts@1.14.0npm ls react-native
: react-native@0.55.4npm ls expo
: expo@27.1.0node -v
: v10.4.1npm -v
: 6.1.0yarn --version
: 1.7.0watchman version
: “version”: “4.9.0”
Also specify:
- Operating system: macOS High Sierra 10.13.5
- Phone/emulator/simulator & version: Version 10.0 (SimulatorApp-851.2 CoreSimulator-518.22)
Reproducible Demo
This is reproducable by following the steps in the guide linked above.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:16
I managed to find the solution.
There could be multiple reasons for the issue. For the most recent version of react-native (Aug 2018), what you might need to do is just press ‘q’, it will displays the QR code.
After that, you use the expo app scan the QR code, it should start to bundle the scripts and load it to your phone.
If not, you have might another issue which is caused by the incompatibility among React-Native, React and Expo. If you are using Expo 27, you should use reactive-native 0.55.
There is a complete matrix here, https://github.com/react-community/create-react-native-app/blob/master/VERSIONS.md
Anyone who face problem after running
npm audit fix
, that is because it will try to install react-native 0.56 which doesn’t work with Expo 27 well.I solve by changing the
react-native-scripts
from1.14.1
to1.14.0
andreact-native
from0.56
to0.55.4
. Thenrm -rf node_modules
andnpm install
. This installation will displays vulnerabilities warning, and npm recommend tonpm audit
. Just leave it andnpm start
.