Skip to content

Commit c6da669

Browse files
committed
Add --experimental-global-webcrypto node option fix "crypto is not defined error" on Node.js 18 in dev
1 parent 0d38ea0 commit c6da669

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/green-cheetahs-scream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/core": patch
3+
---
4+
5+
Add --experimental-global-webcrypto node option fix "crypto is not defined error" on Node.js 18 in dev

packages/core/src/v3/build/runtime.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ export function execOptionsForRuntime(runtime: BuildRuntime, options: ExecOption
4848

4949
const conditions = options.customConditions?.map((condition) => `--conditions=${condition}`);
5050

51-
return [importEntryPoint, conditions, process.env.NODE_OPTIONS]
51+
return [
52+
importEntryPoint,
53+
conditions,
54+
process.env.NODE_OPTIONS,
55+
"--experimental-global-webcrypto",
56+
]
5257
.filter(Boolean)
5358
.flat()
5459
.join(" ");

0 commit comments

Comments
 (0)