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 --test --watch hangs on invalid import syntax #62021
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 hang.
Why: Because it should watch.
What do you see instead?
Hangs after the summary until Ctrl+C and prints one last summary after that.
So for the minimal example given before, that's one error message and two summaries in total.
The error is similar to this:
SyntaxError: Unexpected end of input
at compileSourceTextModule (node:internal/modules/esm/utils:305:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:111:18)
at #translate (node:internal/modules/esm/loader:467:20)
at afterLoad (node:internal/modules/esm/loader:523:29)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:528:12)
at #getOrCreateModuleJobAfterResolve (node:internal/modules/esm/loader:565:36)
at afterResolve (node:internal/modules/esm/loader:618:52)
at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:624:12)
at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:643:32)
at TracingChannel.tracePromise (node:diagnostics_channel:350:14)
Additional information
Idea: --test and --watch should have what --check does as an internal per file and change prerequisite.
Activity
Renegade334 commentedon Feb 27, 2026
Same issue as #62022, please upgrade.