Title: VSCode extension listens to file changes in node_modules, causing too many active listeners · Issue #66924 · angular/angular · GitHub
Open Graph Title: VSCode extension listens to file changes in node_modules, causing too many active listeners · Issue #66924 · angular/angular
X Title: VSCode extension listens to file changes in node_modules, causing too many active listeners · Issue #66924 · angular/angular
Description: Is this a bug report or a feature request? Bug Report Feature Request Please provide the steps to reproduce the issue [Bug Report only] I recently ran into the issue, that I was unable to start dev servers anymore, due to Error: ENOSPC: ...
Open Graph Description: Is this a bug report or a feature request? Bug Report Feature Request Please provide the steps to reproduce the issue [Bug Report only] I recently ran into the issue, that I was unable to start dev...
X Description: Is this a bug report or a feature request? Bug Report Feature Request Please provide the steps to reproduce the issue [Bug Report only] I recently ran into the issue, that I was unable to start dev...
Opengraph URL: https://github.com/angular/angular/issues/66924
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"VSCode extension listens to file changes in node_modules, causing too many active listeners","articleBody":"### Is this a bug report or a feature request?\n\n- [x] Bug Report\n- [ ] Feature Request\n\n### Please provide the steps to reproduce the issue [Bug Report only]\n\nI recently ran into the issue, that I was unable to start dev servers anymore, due to `Error: ENOSPC: System limit for number of file watchers reached, watch '...'`.\n\nWhile investigating the issue using `strace -f -e inotify_add_watch code 2>&1`, I noticed that extremely many file watches are registered on boot of VSCode. With the help of Gemini, I've traced this further down using an eBPF script:\n\n```bash\nsudo bpftrace -e ' \n/* 1. Catch specific inotify calls with clamped path reading */\ntracepoint:syscalls:sys_enter_inotify_add_watch {\n // Clamp the string read to 64 bytes to stay within verifier limits\n $path = str(args->pathname, 64); \n \n if (strcontains($path, \"node_modules\")) {\n printf(\"\\n[WATCH] PID: %d (%s) -> %s\\n\", pid, comm, $path);\n }\n}\n\n/* 2. Catch process executions with their arguments */\ntracepoint:syscalls:sys_enter_execve {\n printf(\"[EXEC] PID: %d | PPID: %d | CMD: \", pid, curtask->real_parent->pid);\n join(args->argv);\n}'\n```\n\n(clamping the path to 64 was enough for me, you may need to increase the limit.\n\nBy filtering an ungodly amount of logs, I did find those three very suspicious logs:\n\n```\n[EXEC] PID: 212280 | PPID: 211648 | CMD: /usr/share/code/code /home/shayden/.vscode/extensions/nrwl.angular-console-18.85.2/nxls/main.js --node-ipc --clientProcessId=211648\n\n[...]\n\n[WATCH] PID: 212280 (notify-rs inoti) -> /path/to/project/node_modules\n[WATCH] PID: 212280 (notify-rs inoti) -> /path/to/project/node_modules./..\n[WATCH] PID: 212280 (notify-rs inoti) -> /path/to/project/node_modules/...\n[WATCH] PID: 212280 (notify-rs inoti) -> /path/to/project/node_modules/...\n[WATCH] PID: 212280 (notify-rs inoti) -> /path/to/project/node_modules/...\n[...]\n\n\n[EXEC] PID: 212881 | PPID: 211648 | CMD: /usr/share/code/code /home/shayden/.vscode/extensions/angular.ng-template-21.1.1/server --logToConsole --ngProbeLocations /home/shayden/.vscode/extensions/angular.ng-template-21.1.1/path/to/project --includeAutomaticOptionalChainCompletions --includeCompletionsWithSnippetText --includeCompletionsForModuleExports true --angularCoreVersion 21.0.9 --tsdk node_modules/typescript/lib --tsProbeLocations /home/shayden/.vscode/extensions/angular.ng-template-21.1.1/path/to/project --node-ipc\n\n[...]\n\n[WATCH] PID: 212881 (code) -> /path/to/project/node_modules\n[WATCH] PID: 212881 (code) -> /path/to/project/node_modules/...\n[WATCH] PID: 212881 (code) -> /path/to/project/node_modules/...\n[WATCH] PID: 212881 (code) -> /path/to/project/node_modules/...\n[...]\n\n[EXEC] PID: 212881 | PPID: 211648 | CMD: /usr/share/code/code /home/shayden/.vscode/extensions/angular.ng-template-21.1.1/server --logToConsole --ngProbeLocations /home/shayden/.vscode/extensions/angular.ng-template-21.1.1/path/to/project --includeAutomaticOptionalChainCompletions --includeCompletionsWithSnippetText --includeCompletionsForModuleExports true --angularCoreVersion 21.0.9 --tsdk node_modules/typescript/lib --tsProbeLocations /home/shayden/.vscode/extensions/angular.ng-template-21.1.1/path/to/project --node-ipc\n\n[...]\n\n[WATCH] PID: 212881 (code) -> /path/to/project/node_modules\n[WATCH] PID: 212881 (code) -> /path/to/project/node_modules/...\n[WATCH] PID: 212881 (code) -> /path/to/project/node_modules/...\n[WATCH] PID: 212881 (code) -> /path/to/project/node_modules/...\n[...]\n```\n\n(obviously, by monitoring the node_modules, all files in that folder will be watched, I've truncated the output a lot here)\n\nThe last `[EXEC]` log points towards the the Angular language server extension.\n\nSo to answer the question: To reproduce the issue, just open any project containing `node_module`s while the above eBPF tracer is running.\n\n### Please provide the expected behavior vs the actual behavior you encountered [Bug Report only]\n\nThe Angular lang server extension should not watch for file changes in `node_modules`. If you really need to listen for changes of dependencies, maybe just react to changes to `package.json`/`package-lock.json`/`pnpm-lock.yml`/etc.\n\n### Please provide a screenshot if possible [Bug Report only]\n\n_No response_\n\n### Please provide the exception or error you saw [Bug Report only]\n\n```true\n\n```\n\n### Description [Feature Request only]\n\n_No response_\n\n### Proposed solution [Feature Request only]\n\n_No response_\n\n### Alternatives considered [Feature Request only]\n\n_No response_","author":{"url":"https://github.com/Simon-Hayden-Dev","@type":"Person","name":"Simon-Hayden-Dev"},"datePublished":"2026-02-05T11:19:30Z","url":"https://github.com/angular/angular/issues/66924"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:30066d48-af4e-5fe9-f320-8b75360472c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B360:215B92:2FE97F1:3FD43A8:6B01E2E6 |
| html-safe-nonce | 62aac469633aed078ba041e717ca5d5d0a91501d489ce7000d7c94339a523d2c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzYwOjIxNUI5MjoyRkU5N0YxOjNGRDQzQTg6NkIwMUUyRTYiLCJ2aXNpdG9yX2lkIjoiMTA1MDQwOTYzNTAwMzA5NzgzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 35018462fd12932f7ca31734b6fc94151c8a22a318bb867ef6372b0eb050b54f |
| hovercard-subject-tag | issue:3901049104 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/66924/issue_layout |
| twitter:image | https://opengraph.githubassets.com/90672660de3de2360f6e0bdf4e95b45b7e5e3d0c65f86f96dd56466693b99c7f/angular/angular/issues/66924 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/90672660de3de2360f6e0bdf4e95b45b7e5e3d0c65f86f96dd56466693b99c7f/angular/angular/issues/66924 |
| og:image:alt | Is this a bug report or a feature request? Bug Report Feature Request Please provide the steps to reproduce the issue [Bug Report only] I recently ran into the issue, that I was unable to start dev... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Simon-Hayden-Dev |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width