Create-react-native-app: issue running on ubuntu 16.04 (watchman)

Created on 14 Mar 2017  Â·  15Comments  Â·  Source: expo/create-react-native-app

OS Info:

± lsb_release -a
No LSB modules are available.
Distributor ID: neon
Description:    KDE neon LTS User Edition 5.8
Release:        16.04
Codename:       xenial

Run:

$ create-react-native-app my-app
$ cd my-app/
$ yarn start

Output:

± yarn start
yarn start v0.21.3
$ react-native-scripts start
Starting packager...
***ERROR STARTING PACKAGER***
Starting React Native packager...
Scanning 777 folders for symlinks in /home/cj/apps/react-native/my-app/node_modules (4ms)

Running packager on port 19001

Looking for JS files in
   /home/cj/apps/react-native/my-app



React packager ready.



jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
  Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
  Error: A non-recoverable condition has triggered.  Watchman needs your help!
The triggering condition was at timestamp=1489464468: inotify-add-watch(/home/cj/apps/react-native/my-app) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl
All requests will continue to fail with this message until you resolve
the underlying problem.  You will find more information on fixing this at
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch


***ERROR STARTING PACKAGER***
 ERROR  A non-recoverable condition has triggered.  Watchman needs your help!
The triggering condition was at timestamp=1489464468: inotify-add-watch(/home/cj/apps/react-native/my-app) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl
All requests will continue to fail with this message until you resolve
the underlying problem.  You will find more information on fixing this at
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch



{"watchmanResponse":{"version":"4.7.0","error":"A non-recoverable condition has triggered.  Watchman needs your help!\nThe triggering condition was at timestamp=1489464468: inotify-add-watch(/home/cj/apps/react-native/my-app) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl\nAll requests will continue to fail with this message until you resolve\nthe underlying problem.  You will find more information on fixing this at\nhttps://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch\n"}}

***ERROR STARTING PACKAGER***

Error: A non-recoverable condition has triggered.  Watchman needs your help!
The triggering condition was at timestamp=1489464468: inotify-add-watch(/home/cj/apps/react-native/my-app) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl
All requests will continue to fail with this message until you resolve
the underlying problem.  You will find more information on fixing this at
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch

    at ChildProcess.<anonymous> (/home/cj/apps/react-native/my-app/node_modules/fb-watchman/index.js:207:21)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:498:12)

Done in 12.14s.

Most helpful comment

I got it working by running:

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

All 15 comments

I got it working by running:

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

@cj Thanks so much for the detailed report! You did identify the correct fix for this. I'll make a note to add watchman troubleshooting to the user guide.

+1 nice solution!

@cj thank you so much! +1

@cj Awesome !!

@CJ Seriously Thank You so much You saved a lot of time of mine.

it really works fine.
but every day we launch webstorm and every day show error then every day this command giving by me.

plzz give permanent solution ,,,
i think it is temporary.
thanku cj.
your command really well work in ubuntu 16.04 but it is temporary solution.

@Biplovkumar it sounds like your /etc/sysctl.conf file might be getting overwritten. Make sure you have those fs.inotify settings in your config file and that they persist as you use your computer, restart it, etc.

thanku so much sir @ide.
well i try to do it.

@ide Thanks for the solution!
After apply this, it was necessary todo this too:

https://facebook.github.io/watchman/docs/troubleshooting.html#ive-changed-my-limits-how-can-i-clear-the-error

thanku so much,it works fine.

Thanks & Regards.
Biplov kumar

Student
Mca
Vivekananda Institute of Professional Studies
https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwiv8qXam_nLAhVWC44KHT3AA1cQFggcMAA&url=http%3A%2F%2Fwww.vips.edu%2F&usg=AFQjCNEKnNl-jafsVVUbN7tTK-CWiPRlFQ&sig2=lUiba0eZIFSPdVFZWg5Z5g&bvm=bv.118443451,d.c2E
New Delhi, IndiaMob: +91-9835773216

Email:[email protected]
Email:[email protected]

On Mon, Feb 12, 2018 at 6:53 PM, Mateus Henrique notifications@github.com
wrote:

@ide https://github.com/ide Thanks for the solution!
After apply this, it was necessary todo this too:

https://facebook.github.io/watchman/docs/troubleshooting.
html#ive-changed-my-limits-how-can-i-clear-the-error

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/react-community/create-react-native-app/issues/51#issuecomment-364920929,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ac_icABP6d0TudXAJDXOF8F3GBlam-q8ks5tUDtHgaJpZM4McG5H
.

@cj Top!!!!

@cj worked for me. Thanks a lot.

@cj nice solution

@cj nice solution

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andyvanosdale picture andyvanosdale  Â·  3Comments

FezVrasta picture FezVrasta  Â·  3Comments

Jawadgee picture Jawadgee  Â·  3Comments

JackWReid picture JackWReid  Â·  4Comments

anp picture anp  Â·  3Comments