Fix issue when using SDK in non-node environments by scoping the stream import with node:

This commit is contained in:
Eric Allam
2024-05-25 21:43:16 +01:00
parent 6243ae30bb
commit ece6ca678a
3 changed files with 7 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/core": patch
---
Fix issue when using SDK in non-node environments by scoping the stream import with node:
+1 -1
View File
@@ -4,7 +4,7 @@ import { APIConnectionError, APIError } from "./apiErrors";
import { RetryOptions } from "./schemas";
import { calculateNextRetryDelay } from "./utils/retries";
import { FormDataEncoder } from "form-data-encoder";
import { Readable } from "stream";
import { Readable } from "node:stream";
export const defaultRetryOptions = {
maxAttempts: 3,
+1
View File
@@ -16,4 +16,5 @@ export default defineConfig({
"./src/v3/prod/index.ts",
"./src/v3/workers/index.ts",
],
external: ["node:stream"],
});