PhpStorm: after update to 2022.3.1 npm watcher failed

84 Views Asked by At

After PhpStorm update to 2022.3.1 the npm watcher fails.

If I start from terminal inside PhpStorm (version 2022.3.1), the following error is thrown:

...
Error: ENOSPC: System limit for number of file watchers reached, watch '/var/www/html/src/Administration/Resources/app/administration/src'
    at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
    at Object.watch (node:fs:2301:34)
    at createFsWatchInstance (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:119:15)
    at setFsWatchListener (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:166:15)
    at NodeFsHandler._watchWithNodeFs (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:331:14)
    at NodeFsHandler._handleDir (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:559:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async NodeFsHandler._addToNodeFs (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:608:16)
    at async /var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/index.js:445:21
    at async Promise.all (index 0)
Emitted 'error' event on FSWatcher instance at:
    at FSWatcher._handleError (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/index.js:641:10)
    at NodeFsHandler._addToNodeFs (/var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/lib/nodefs-handler.js:636:18)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /var/www/html/src/Administration/Resources/app/administration/node_modules/chokidar/index.js:445:21
    at async Promise.all (index 0) {
  errno: -28,
  syscall: 'watch',
  code: 'ENOSPC',
  path: '/var/www/html/src/Administration/Resources/app/administration/src',
  filename: '/var/www/html/src/Administration/Resources/app/administration/src'
}
npm notice 
npm notice New major version of npm available! 8.15.0 -> 9.3.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.3.0
npm notice Run npm install -g [email protected] to update!
npm notice 

This error only appears if PhpStorm is open.

Current workaround:

  • Close PhpStorm.
  • Start the watcher request from system terminal (runs without errors).
  • Open PhpStorm to work on dev code.

Questions:

  • Where can I check my last PhpStorm update, is there a log file available?
  • Why PhpStorm calls more files to watch than the system terminal and is it so?
  • Is there a configuration for this issue in PhpStorm?

UPDATE #1
Run PhpStorm one day later and use its terminal to start the watcher, the watcher works normally. This behavior has been observed before.

Any suggestions?

0

There are 0 best solutions below