Describe the issue
The TypeScript SDK docs example uses @hatchet-dev/typescript-sdk/v1, but in native Node ESM this throws ERR_UNSUPPORTED_DIR_IMPORT at runtime. Node suggests @hatchet-dev/typescript-sdk/v1/index.js instead. This makes the documented import path incorrect or incomplete for ESM users.
Environment
- SDK:
@hatchet-dev/typescript-sdk 1.21.0
- Runtime: Node.js
24.14.1 (native ESM, type: "module")
- Engine: Cloud - latest
Expected behavior
The documented import path @hatchet-dev/typescript-sdk/v1 should work in ESM projects, or docs should explicitly mention the ESM-safe import path if different.
Code to Reproduce, Logs, or Screenshots
Repro repo: repo
Error observed at runtime: ERR_UNSUPPORTED_DIR_IMPORT for @hatchet-dev/typescript-sdk/v1 in native ESM.
Additional context
Behavior differs between module systems: CommonJS can resolve it, while native ESM cannot.
Describe the issue
The TypeScript SDK docs example uses
@hatchet-dev/typescript-sdk/v1, but in native Node ESM this throwsERR_UNSUPPORTED_DIR_IMPORTat runtime. Node suggests@hatchet-dev/typescript-sdk/v1/index.jsinstead. This makes the documented import path incorrect or incomplete for ESM users.Environment
@hatchet-dev/typescript-sdk1.21.024.14.1(native ESM,type: "module")Expected behavior
The documented import path
@hatchet-dev/typescript-sdk/v1should work in ESM projects, or docs should explicitly mention the ESM-safe import path if different.Code to Reproduce, Logs, or Screenshots
Repro repo: repo
Error observed at runtime:
ERR_UNSUPPORTED_DIR_IMPORTfor@hatchet-dev/typescript-sdk/v1in native ESM.Additional context
Behavior differs between module systems: CommonJS can resolve it, while native ESM cannot.