Replies: 4 comments 3 replies
-
I've encountered the same issue with Next.js 14 and found that it's caused by client-/server-side execution. On the server, there's no |
Beta Was this translation helpful? Give feedback.
-
I put "use client" at the root of my page.tsx. I then had a component inside that used FileList in a zod schema. Same error of "ReferenceError: FileList is not defined". What a pain...I just removed FileList and wrote z.any(). |
Beta Was this translation helpful? Give feedback.
-
Using "dynamic" solved the problem for me. In page.tsx
this is the checkout form component
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It happens when I run "npm run build"
let me show you the complete error
and where I am using "FileList"?
I don´t whant to make it really long, so here is the complete code of the first componente where I use it:
https://github.com/KatuGT/sonieQue/blob/front/postSuenio/src/components/PostSuenio.tsx
and the function https://github.com/KatuGT/sonieQue/blob/front/postSuenio/src/utils/uploadImages.tsx
It is a Typescript, React Hook form, zod or a Next.js error/bug? or my error?
of course I made my research in google, chat GPT and the Bing chat but don´t help me with this
Beta Was this translation helpful? Give feedback.
All reactions