0

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?

Nick Briz
  • 1,917
  • 3
  • 20
  • 34
  • https://stackoverflow.com/a/32600959/239354 – Aldarund Feb 27 '19 at 17:12
  • @Aldarund thanks, this worked! But I'm not exactly sure why? My initial inotify file watch limit was 8192 and the dev server ran fine. It's only after restarting my machine that it stops working. But if i take the steps i mentioned above it starts to work again, all with the same watch limit of 8192. – Nick Briz Mar 01 '19 at 23:22
  • idk why it's like that :) glitches – Aldarund Mar 02 '19 at 00:46

0 Answers0