Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue running on ubuntu 16.04 (watchman) #51

Closed
cj opened this issue Mar 14, 2017 · 15 comments
Closed

issue running on ubuntu 16.04 (watchman) #51

cj opened this issue Mar 14, 2017 · 15 comments

Comments

@cj
Copy link

cj commented Mar 14, 2017

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.
@cj
Copy link
Author

cj commented Mar 14, 2017

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 cj closed this as completed Mar 14, 2017
@anp
Copy link
Contributor

anp commented Mar 14, 2017

@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.

@pauleonardo
Copy link

+1 nice solution!

@george-martin
Copy link

@cj thank you so much! +1

@jayabhar
Copy link

@cj Awesome !!

@ankush-0x90
Copy link

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

@Biplovkumar
Copy link

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.

@ide
Copy link
Member

ide commented Feb 5, 2018

@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.

@Biplovkumar
Copy link

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

@mateusdotcc
Copy link

@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

@Biplovkumar
Copy link

Biplovkumar commented Feb 13, 2018 via email

@LUCASNDIAS
Copy link

@cj Top!!!!

@satya1395
Copy link

@cj worked for me. Thanks a lot.

@oulhafiane
Copy link

@cj nice solution

1 similar comment
@oulhafiane
Copy link

@cj nice solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests