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

Error: watch elm-stuff ENOSPC + solution #2

Open
ghost opened this issue Oct 15, 2017 · 0 comments
Open

Error: watch elm-stuff ENOSPC + solution #2

ghost opened this issue Oct 15, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 15, 2017

Hello,

First, thank you for this great tutorial.

So...
When I tested your example, I had this error in my terminal (after the yarn start) :

yarn run v1.1.0
$ elm-live src/Main.elm --pushstate
Success! Compiled 1 module.                                         
Successfully generated index.html

elm-live:
  The build has succeeded. Starting the server!

[0000] info  Server running at http://localhost:8000/ (connect)
[0000] info  LiveReload running on 35729
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: watch elm-stuff ENOSPC
    at _errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1383:19)
    at Object.fs.watch (fs.js:1409:11)
    at createFsWatchInstance (/elm-navigation-pushstate/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/elm-navigation-pushstate/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/elm-navigation-pushstate/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/elm-navigation-pushstate/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/elm-navigation-pushstate/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/elm-navigation-pushstate/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:154:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

After some researches, I found something here.
This following command solve the problem 👍 :
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

I don't know if it's the better solution but it works.

If someone have the same problem, maybe this will help him.
If you think that is relevant, maybe you can add it at the end of your README file.

PS: Sorry for my english, it's not my mother tongue.

Regards

Guillaume DUVAL

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

0 participants