question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

issue running on ubuntu 16.04 (watchman)

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

149reactions
cjcommented, 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
0reactions
oulhafianecommented, Jun 12, 2018

@cj nice solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error installing watchman on Ubuntu 16.04
It's fine, I just deleted the folder, re-cloned, and it worked just fine. I think I was running into issues trying to install...
Read more >
Facebook watchman everytime looses connection on ubuntu ...
If there are too many paths (see roots), watchman takes too long to crawl all the files. To delete all the paths, run...
Read more >
HOW TO – Install Facebook's Watchman on Linux Ubuntu ...
HOW TO – Install Facebook's Watchman on Linux Ubuntu 16.04 LTS · Install GNU M4: sudo apt-get install m4 · Install automake &...
Read more >
How to install Watchman in Ubuntu 16.04? - Webonsky
1- Go to home directory: $ cd ~. 2- Clone using below command: $ git clone https://github.com/facebook/watchman.git. 3- Get into watchman directory:
Read more >
Release Notes: Linux Client - Watchman Monitoring®
FEATURES New command line tooling options via “run-client” Plugins can be enabled ... Beacon Reporting comes to Linux Changes Improved support for Ubuntu...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found