Skip to content

Commit 29d9767

Browse files
fix(storage-transfer): use z.string().url() for Zod 3 compat
z.url() is Zod 4 top-level syntax. The hoisted node_modules/zod resolves to v3.25.76 (despite apps/sim/package.json declaring 4.3.6 — a workspace resolution conflict), so z.url is undefined at runtime. Trigger.dev's bundler eagerly evaluates all task-reachable modules at startup and hits this with `external_exports.url is not a function`. Next.js dev only evaluates routes per-request so the call site never fires. Quick fix: revert to the chained .string().url() form which works on both Zod 3 and Zod 4 (deprecated in 4 but still supported). The underlying version-resolution conflict is a separate cleanup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9eb3067 commit 29d9767

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/sim/lib/api/contracts/storage-transfer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ export const fileDownloadBodySchema = z
290290
isExecutionFile: z.boolean().optional(),
291291
context: downloadContextSchema.optional(),
292292
url: z
293+
.string()
293294
.url()
294295
.refine((value) => ['http:', 'https:'].includes(new URL(value).protocol), {
295296
message: 'URL must use http or https',

0 commit comments

Comments
 (0)