Polar error after upgrading to zod 4 beta

There is an error when i updated my zod version to latest zod@4-beta
TypeError: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$polar$2d$sh$2f$sdk$2f$dist$2f$esm$2f$models$2f$components$2f$customfieldcheckbox$2e$js__$5b$app$2d$route$5d$__$28$ecmascript$29$__.CustomFieldCheckbox$inboundSchema.and is not a function
at [project]/node_modules/@polar-sh/sdk/dist/esm/models/components/customfield.js [app-route] (ecmascript) (../../../../src/models/components/customfield.ts:53:36)

3 | import { db } from "@/db";
4 | import { organization } from "better-auth/plugins/organization";
> 5 | import { polar } from "@polar-sh/better-auth";
6 | import { Polar } from "@polar-sh/sdk";
7 |
8 | const client = new Polar({ {
page: '/api/auth/sign-in/social'
}
POST /api/auth/sign-in/social 500 in 86ms
TypeError: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$polar$2d$sh$2f$sdk$2f$dist$2f$esm$2f$models$2f$components$2f$customfieldcheckbox$2e$js__$5b$app$2d$route$5d$__$28$ecmascript$29$__.CustomFieldCheckbox$inboundSchema.and is not a function
at [project]/node_modules/@polar-sh/sdk/dist/esm/models/components/customfield.js [app-route] (ecmascript) (../../../../src/models/components/customfield.ts:53:36)

3 | import { db } from "@/db";
4 | import { organization } from "better-auth/plugins/organization";
> 5 | import { polar } from "@polar-sh/better-auth";
6 | import { Polar } from "@polar-sh/sdk";
7 |
8 | const client = new Polar({ {
page: '/api/auth/sign-in/social'
}
POST /api/auth/sign-in/social 500 in 86ms
3 Replies
nikatune
nikatuneOP6mo ago
Its okay i downgraded my zod version I told you so you know @bekacru
bekacru
bekacru5mo ago
will check zod v4 today. but if this is on the polar plugin, it's not maintained by us.
nikatune
nikatuneOP5mo ago
Oh then they should fix it oky

Did you find this page helpful?