From 4da41b490f643daa9fd75e3f4804dcc0ceaa4c2c Mon Sep 17 00:00:00 2001 From: Hu Chen Date: Fri, 31 Jan 2020 08:56:03 +0800 Subject: [PATCH] docs: Add troubleshooting documentation on ENOSPC (#8380) Co-authored-by: Ian Schmitz --- docusaurus/docs/troubleshooting.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docusaurus/docs/troubleshooting.md b/docusaurus/docs/troubleshooting.md index 38892e77a78..2b53fe9aab2 100644 --- a/docusaurus/docs/troubleshooting.md +++ b/docusaurus/docs/troubleshooting.md @@ -20,6 +20,24 @@ If this doesn’t happen, try one of the following workarounds: If none of these solutions help please leave a comment [in this thread](https://github.com/facebook/create-react-app/issues/659). +## `npm start` fail due to watch error + +If you are using a Linux operating system and see an error similar to: `ENOSPC: System limit for number of file watchers reached`, you can fix the issue by increasing the `fs.inotify.max_user_watches` setting of your operating system. + +If you are running Debian, RedHat, or another similar Linux distribution, run the following in a terminal: + +```sh +echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p +``` + +If you are running ArchLinux, run the following command instead: + +```sh +echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system +``` + +Then paste it in your terminal and press on enter to run it. You could find more information [here](https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers#the-technical-details). + ## `npm test` hangs or crashes on macOS Sierra If you run `npm test` and the console gets stuck after printing `react-scripts test` to the console there might be a problem with your [Watchman](https://facebook.github.io/watchman/) installation as described in [facebook/create-react-app#713](https://github.com/facebook/create-react-app/issues/713).