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
{{ message }}
Repository navigation
node --watch bails on invalid import syntax #62022
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
What: Don't exit.
Why: Because it should watch.
What do you see instead?
Node bails out with exit code 0.
% node --watch .
file:/// ... /index.mjs:2
SyntaxError: Unexpected end of input
at compileSourceTextModule (node:internal/modules/esm/utils:357:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:109:18)
at #translate (node:internal/modules/esm/loader:564:20)
at afterLoad (node:internal/modules/esm/loader:614:29)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:619:12)
at #createModuleJob (node:internal/modules/esm/loader:643:36)
at #getJobFromResolveResult (node:internal/modules/esm/loader:353:34)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:318:41)
at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:685:25)
Node.js v25.0.0
Failed running '.'. Waiting for file changes before restarting...
Activity
Renegade334 commentedon Feb 27, 2026
This was fixed in #61232. Upgrade to v25.5.0 or later.
valler commentedon Feb 27, 2026
Can confirm.