Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stuck in "Starting packager" - React Native

When I run the get started React Native project (you can see here) the npm start script stucks on Starting packager

I already read this topics about the problem:

react-community issue: 203

react-native-stuck-at-starting-packager

react-community issue: 302

But no one of the solutions helped me. I tried to change the number of watchers, but didn´t work. I tried to install the watchman but hasn´t helpfull.

Some enviroment informations:

S.O.: Linux 64bits Node v: v7.10.0

Could anyone help me?

like image 330
Marcos Henrique Avatar asked Mar 10 '26 22:03

Marcos Henrique


1 Answers

Had the same problem just starting with create-react-native-app on Ubuntu 17.10 and finally got it working on Linux.

First of all, update your node version. Check inside the project with react-native info you have something similar to:

Environment:
  OS: Linux 4.13
  Node: 8.9.1
  Yarn: 1.3.2
  npm: 5.5.1
  Watchman: 4.9.0
  Xcode: N/A
  Android Studio: Not Found

Packages: (wanted => installed)
  react: 16.0.0-beta.5 => 16.0.0-beta.5
  react-native: ^0.49.5 => 0.49.5

For a fresh Ubuntu install you'll need the following dependencies to build Watchman:

$ sudo apt-get install python-dev libssl-dev autoconf automake libtool

Build Watchman from source:

$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ git checkout v4.9.0  # the latest stable release
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

Next, this:

$ echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
$ echo fs.inotify.max_queued_events=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

And finally, you can run yarn start and it should work.

like image 159
Eldelshell Avatar answered Mar 13 '26 11:03

Eldelshell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!