1

When I'm running 'npm start', I'm getting the following error:

...
...
Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reached, watch '/my_project/node_modules/@babel/runtime/helpers'
/my_project/node_modules/react-scripts/scripts/start.js:19
  throw err;
  ^

Error: ENOSPC: System limit for number of file watchers reached, watch '/my_project/src'
...
...

I'm using corporate machines, so I can't increase the limit for the number of watchers.

I read online that I should go to 'node_modules/react-scripts/config/webpackDebServer.config.js' and make sure to ignore the node_modules dir.

I tried playing with it the whole day, but still every attempt to run the react app ends up with the same error message.

Any idea how I can overcome this issue? how to make webpack ignore the node_modules?

Thanks!

LDevelop
  • 31
  • 2
  • Does this answer your question? [Nodemon Error: "System limit for number of file watchers reached"](https://stackoverflow.com/questions/53930305/nodemon-error-system-limit-for-number-of-file-watchers-reached) – jmargolisvt May 22 '23 at 15:06
  • Hi @jmargolisvt, Unfortunately, not really, because the suggestion over there is to increase the limit of file watchers, however, I don't have root permission. A solution for my problem will need to be ignoring the watching of irrelevant directories. – LDevelop May 23 '23 at 10:59

0 Answers0