#Zod error no log

2 messages · Page 1 of 1 (latest)

simple shore
#

Hi
I'm new in JS world, i'm using collection well with zod but i have an error when npm run build but any informations about the error.
Do you know how i can have more data with zod ? I'm sure it's zod if i remove the schema its building

Clearing content store
file:///....zod/v3/types.js:3283
return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
^

TypeError: effect.transform is not a function

thank 🙂

#

ok i find the problem commented one line by one line ...

I have in helper file ts

const transformToDate = (dateString: string) => new Date(dateString);

And use it in zod schema : created_at: z.string().transform(transformToDate),

It's crash, but if i copy the method in zod schema file , it's working 😤🤯