-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Start script hangs without error when there are no available inotify watches #234
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@Tetralix On Linux do "sudo sysctl -w fs.inotify.max_user_watches=10000". This changes kernel sysctl value. This is temporary until reboot. To make it permanent, add fs.inotify.max_user_watches=10000 to a file in /etc/sysctl.d directory or /etc/sysctl.conf depending on distro. |
This comment has been minimized.
This comment has been minimized.
Spent hours googling, reinstalling, upgrading, downgrading, switching to yarn until I found this issue. Thank you! +1 to have an error message... Used this guide to increase the inotify watchers max amount: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
FYI, I ran into the same issue again, but fixed with running
I think it would be weird and confusing to come across this error at very beginning. And it would not hurt to mention this in an obvious position of the document, rather than in this issue. ADMIN EDIT: these commands work for Mac only. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
To solve this issue, just install Watchman via Homebrew (for macOS) with: $ brew update
$ brew install watchman Source: Watchman docs. For other operating systems, refer to their docs. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just ran into this issue. Agreed with the above commenters that something like:
should be added to the error message. Of course adding other relevant information for other OS's as well. Pretty bad developer experience to have to come to this GH issue & skim to find out what I needed to do just to run the example setup. |
Maybe just include a URL to watchman -- no sense providing install instructions as they vary by platform and could be subject to change, no sense coupling CRNA to the installation instructions for watchman IMO. e.g.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
OSX; ran into same thing, had to read the entire thread to find out what "install watchman" means and that it doesn't mean npm, agree with comments that it should at least point to the watchman website, although having it suggest "brew install watchman" would be by far the most helpful. |
@willxy you're right! Since this issue is apparently showing up in search results for lots of people, I decided to lock this and to hide all comments that don't contain important information for fixing the issue. Hopefully it should be much easier to read the history now. If after installing watchman (NOT using the |
Description
I tried to run
npm start
in a new project (i.e. I ran the four commands under "Quick Overview"), and it hanged indefinitely (well, at least for several minutes until I aborted) after the output "Starting packager...".Running
react-native start
gave the errorERROR watch {path} ENOSPC
, which made me realize that there were no available inotify watches.After increasing
fs.inotify.max_user_watches
,npm start
started and ran normally.Expected Behavior
npm start
should give a warning or exit with an error saying that there are no available watches, so it can't start.Observed Behavior
npm start
hanged with this output, and never continued:Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts
: [email protected]npm ls react-native
: [email protected]npm ls expo
: [email protected]node -v
: v7.10.0npm -v
: 4.6.1yarn --version
: 0.24.6watchman version
: Not installedAlso specify:
Reproducible Demo
Ran
npm start
in a clean project just created, so nothing to provide here.The text was updated successfully, but these errors were encountered: