temporalio / temporalio/sdk-typescript

[Bug] Internal error with node --watch on node 24.18+

Open
#2,196 0 comments 1 reaction 1 assignee View on GitHub

@mjameswh is already working on this.

Since Jul 14, 2026.

bug
Dominant language
TypeScript
Stars
917
Forks
224
Avg merge
3d 16h
Merged PRs (30d)
43

Description

What are you really trying to do?

Start a worker with node --watch on node 24.18.

Describe the bug
[08:45:30] ERROR (be-08-45-30): uncaught exception
    err: {
      "type": "IllegalStateError",
      "message": "Got completion for unknown requestId undefined",
      "stack":
          IllegalStateError: Got completion for unknown requestId undefined
              at Worker.<anonymous> (/app/node_modules/.bun/@temporalio+worker@1.19.1/node_modules/@temporalio/worker/src/workflow/threaded-vm.ts:73:15)
              at Worker.emit (node:events:509:28)
              at MessagePort.<anonymous> (node:internal/worker:350:14)
              at [nodejs.internal.kHybridDispatch] (node:internal/event_target:843:20)
              at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)
      "name": "IllegalStateError"
    }
Minimal Reproduction

temporal-watch-crash.mjs

import { Worker } from '@temporalio/worker';
await Worker.create({
  workflowsPath: new URL('./workflows.mjs', import.meta.url).pathname,
  taskQueue: 'repro',
});
console.log('created worker (no crash)');
process.exit(0);

workflows.mjs

export async function noop() { return 1; }
% fnm use 24.18
Using Node v24.18.0
% node --watch temporal-watch-crash.mjs
Environment/Versions
  • OS and processor: M5 Mac
  • Temporal Version: ts sdk 1.19, 1.20.
  • Are you using Docker or Kubernetes or building Temporal from source? docker server for tests
Additional context

It appears node has a new worker reporting mechanism, WATCH_REPORT_DEPENDENCIES, which generates unexpected messages on the worker's channel.

I do not ever want an internal error to exit my process, as is the default on newer node, so additional error handling in this area would be cool, too.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.