Skip to content

Fix durable workflow imports with Yarn PnP - #6973

Open
wengkhing wants to merge 3 commits into
anomalyco:devfrom
wengkhing:fix/durable-sdk-esm
Open

Fix durable workflow imports with Yarn PnP#6973
wengkhing wants to merge 3 commits into
anomalyco:devfrom
wengkhing:fix/durable-sdk-esm

Conversation

@wengkhing

@wengkhing wengkhing commented Aug 19, 2026

Copy link
Copy Markdown

Problem

SST Workflow applications can fail before synthesis under Node 22 and Yarn PnP when a config imports a module that imports sst/aws/workflow.

The durable SDK ESM entrypoint statically imports named exports from the CommonJS @aws-sdk/client-lambda package. Yarn PnP exposes that package through a CommonJS loader, so Node rejects the import before SST can evaluate the config:

SyntaxError: Named export `CheckpointDurableExecutionCommand` not found

This blocks sst diff, sst deploy, and sst dev for otherwise valid durable workflow applications.

Fix

Load the durable SDK through Node createRequire() while retaining type-only imports. This selects the SDK CommonJS entrypoint, which works with Yarn PnP and preserves the existing durable SDK version and SST workflow API.

Testing

  • bun run typecheck:sdk
  • bun run build:sdk
  • Node 22 ESM import of sst/aws/workflow

@wengkhing wengkhing changed the title Fix durable workflow imports in Node ESM Fix durable workflow imports with Yarn PnP Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant