I'm working on a pretty simple nuxt.js project, I've started to notice that every time I reboot my machine (my laptop, running Ubuntu 18.04.1 LTS) and reopen my project, when I try to rerun the dev server npm run dev
... it won't work, i get this error:
events.js:183
throw er; // Unhandled 'error' event
^
Error: watch /path/to/project/layouts ENOSPC
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project_name@1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project_name@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I've tried all sorts of things to solve this problem, and have recently realized that if I take the following steps it starts to work again:
- cd into a new directory
- create a new project
npx create-nuxt-app project
- then cd into that project and run that dev server
npm run dev
, then quit that dev server - then cd back into my original project (which was throwing the error) and run the dev server... and then somehow that would work
Obviously, this is bizarre and not a sustainable solution. Any ideas what might be going on here?