create-react-native-app: react-native-scripts start stuck at "Starting packager..."
Description
I can’t start any CRNA project because it get stuck at “Starting packager”, i tried many project but the problem still remains. It always get stuck at “Starting packager…”
Expected Behavior
It should start the project and show me the expo QR code
Observed Behavior
Stuck at “Starting packager…”
Note
npm shows me an unmet dependency error with expo and react:
npm ERR! peer dep missing: react@>=15.3.1, required by lottie-react-native@1.1.1
npm ERR! peer dep missing: react@>=15.4.0, required by react-native-branch@2.0.0-beta.3
Environment
npm ls react-native-scripts: react-native-scripts@1.1.0npm ls react-native: react-native@0.46.4npm ls expo: expo@19.0.1node -v: v7.10.0npm -v: 4.2.0yarn --version: 0.24.5
- Operating system: Ubuntu 16.04
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 29
- Comments: 60 (3 by maintainers)
Try
If it’s still stuck, then install watchman from here and do this
I’m seeing this problem as well.
Host: Ubuntu 17.04 64-bit Node: 8.4.0 NPM: 4.6.1 create-react-native-app: 1.0.0
Creating the project:
Attempting to start Expo:
…and nothing happens after that. No QR code. Nothing.
I tried running:
…and installing watchman. Neither made any difference.
When it says “Starting packager…” press the “q” key. To show QR code
When it says “Starting packager…”, press the “q” key.
Fixed by running
sudo sysctl -w fs.inotify.max_user_watches=10000@nathan-osman Have the same problem on a mac sierra
If you did
npm audit fixyou might have updated your dependencies to latest versions and the problem is that REACT-NATIVE 0.56.* DOESNT WORK WITH EXPO 27. You should use 0.55.* REACT-NATIVE and never runnpm audit fixbutnpm auditto fix manuallyThis works for me in package.json
here is table of compatabilities
I have 2 machines: Both run Ubuntu 16.04, same nodejs, yarn, create-react-native-app version, but one use SSD and one doesn’t. The one without SSD does not have this problem. The one with SSD needs a very big
fs.inotify.max_user_watches(mine was 10000000)Hopefully this info can be helpful in finding the root cause somehow.
Hi All, on my Ubuntu-System the Packager always stucks and the react-native-app not start fully.
The hint to add the parameters
fs.inotify....tosysctlnot worked at all, in no way for me.I tried other different things under Ubuntu 17.10, but the only thing what worked was the manual compilation and installation from watchman (see https://facebook.github.io/watchman/docs/install.html):
sudo apt-get install -y autoconf automake build-essential python-devgit clone https://github.com/facebook/watchman.gitcd watchmangit checkout v4.9.0 # the latest stable release./autogen.sh./configuremakesudo make installThen use
sudo npm updatein the projectand
sudo npm startThis worked for me.
Solved by connecting to a VPN.
Facing issues with the
npm starstuck with no error. Started from #234 and learned to increase my inotify watchers but the problem still come from time to time. So as @limichange and @0x5e i concluded it’s a network related issue!A quick look at the packager scripts no requests appear there! and even with
DEBUG=*and--verbosenothing useful is logged! So tried runningiftopto monitor requests and i see many of them to aws, cloudfront, …etc which seems to be fired somewhere from the packager dependencies (expo probably). As of other users from China we share the same issue requiring proxy connection for these hosts and being based in Africa, we have a bad connection!I really loved the convenience this package brings to RN development experience and it would be great to be able to develop offline and only request internet connection if/when user wants to publish to expo or something!
Please let me know if there might be another cause to this and how can i help resolving it?
The following stackflow suggestion fixed it for me.
https://stackoverflow.com/questions/50724521/react-native-stuck-starting-packager
I added
127.0.2.1 exp.hostto/etc/hostas a workaround.Had the same problem just starting with create-react-native-app today on Ubuntu 17.10 and finally got it working on Linux.
First of all:
Install watchman as explained here
For a fresh Ubuntu install you’ll need the following dependencies to build Watchman:
Not sure why
python-devandlibssl-devare not mentioned, but you’ll need them to build it.Follow the instructions for Build from Source.
Next, this:
And finally, you can run
yarn startand it should work.thanks a ton, @dhruvdutt
even if you’ve installed
watchmanwithbrew,watchman watch-del-all && watchman shutdown-server(it should be supposed to, right?) in the root dir still works and solved the infamous “Starting packager…” freeze issue.the trick was
watchman shutdown-serverhere.watchman watch-del-allonly was never enough in my case.I don’t know what solved it for me but here are the steps I took:
This gave me the QR code!
I ran the
sysctlcommands on Ubuntu 17.04, but to no avail. What did work however was removingnode_modulesand then installing all packages with yarn instead of npm throughyarn install. I had previously runnpm installout of sheer habit.Hey guys. I faced the same problem and this solved the problem for me. I hope it will solve your problem too.
I found it in Expo forums.
Reference : https://forums.expo.io/t/packager-not-loading-on-linux/2034
I have the same problems with fresh CRNA project. I am using Ubuntu 16.04.