Version
v25.6.0
Platform
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:
"scripts": {
"dev": "NODE_OPTIONS='--watch' app",
}
...where app is in node_modules/.bin/.
Version
v25.6.0
Platform
Subsystem
No response
What steps will reproduce the bug?
test.jsand make it executable:NODE_OPTIONS="--watch" ./test.jsHow 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
helloinstdoutand then exiting.What do you see instead?
There is no output. I can see in my process list that there are hundreds of
nodeprocesses spawning.Additional information
This seems to be the same issue as #51159. For additional context, my intent was to reuse a
binentrypoint inpackage.jsonbut with--watchmode, so under thescriptsfield it looked roughly like:...where
appis innode_modules/.bin/.