You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Darwin <redacted> 24.6.0 Darwin Kernel Version 24.6.0: Wed Nov 5 21:33:58 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_ARM64_T6000 arm64 arm Darwin
Subsystem
No response
What steps will reproduce the bug?
Write the following to test.js and make it executable:
#!/usr/bin/env node
console.log('hello');
NODE_OPTIONS="--watch" ./test.js
How often does it reproduce? Is there a required condition?
This is always reproducible.
What is the expected behavior? Why is that the expected behavior?
I would expect it to run normally, producing hello in stdout and then exiting.
What do you see instead?
There is no output. I can see in my process list that there are hundreds of node processes spawning.
Additional information
This seems to be the same issue as #51159. For additional context, my intent was to reuse a bin entrypoint in package.json but with --watch mode, so under the scripts field it looked roughly like:
FYI node --watch with no arguments is considered valid since that change, which seems a little counter-intuitive
renegade@venus:~$ node --watchWelcome to Node.js v24.13.1.Type ".help" for more information.
> .exitCompleted running ''. Waiting for file changes before restarting...renegade@venus:~$
Appears in v25.1.0, most likely relating to #61626
So, it looks like this bug actually existed before that PR. The only difference is that NODE_OPTIONS=--watch without a filename parameter used to be rejected prior to that change; the bug still existed, but it was just slightly unnatural to trigger:
Using node --watch index.js caused a similar behavior in my Express Application, which restarted on every incoming request from the client.
Also using that command causes a change event on the index.js file.
Activity
Renegade334 commentedon Feb 8, 2026
Appears in v25.1.0, most likely relating to #60178 (cc @marco-ippolito)
kennedybilly2 commentedon Feb 8, 2026
marco-ippolito commentedon Feb 11, 2026
I'll take a look
Renegade334 commentedon Feb 11, 2026
FYI
node --watchwith no arguments is considered valid since that change, which seems a little counter-intuitiveRenegade334 commentedon Feb 14, 2026
So, it looks like this bug actually existed before that PR. The only difference is that
NODE_OPTIONS=--watchwithout a filename parameter used to be rejected prior to that change; the bug still existed, but it was just slightly unnatural to trigger:vassudanagunta commentedon Jun 25, 2026
Opened issue #64135
vikram0x00 commentedon Aug 21, 2026
Using
node --watch index.jscaused a similar behavior in my Express Application, which restarted on every incoming request from the client.Also using that command causes a
changeevent on theindex.jsfile.watch: strip watch flags from NODE_OPTIONS in child process
watch: strip watch flags from NODE_OPTIONS in child process