-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"window is not defined" error in Next.js 14 #548
Comments
I have a basic setup of the app recommended in the documentation and facing a similar issue while building the NextJs React app. Build error occurred |
Hey guys @viralP1 @Matthew-owo I am currently working on this issue, but please help me understand something: does this issue get resolved with a regular old check for
does it work? Or does it still not like the actual imports of Form.io? FWIW I believe this is the recommended approach for client components with client-side-only code. |
Yes @brendanbond the approach you suggested is the typical way to handle Client Side Rendering (CSR) in the next.js. I implemented that solution in my project but it didn't work for me. This is another approach I found: Now you can use the Form object as you need |
Any update on this? there are still issues rendering in nextjs (e.g. choice.js not working because of this dynamic load) |
What shall we do here I am not getting any solution, and I do not have any control over node_modules, Please suggest |
@fowlerwill @mdkacode what version of the library are you using? I've made some updates in |
I am using 14.2 |
@SukoonAdmin version of the @formio/react library |
I'm trying to use formio in next js, but I get the following error, but the form seems to render successfully.
Am I using formio correctly? Or does formio not support next js?
Sample Code:
Terminal:
package.json
The text was updated successfully, but these errors were encountered: