Skip to content
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

nextjs deployment - window is not defined #147

Closed
brampurnot opened this issue May 20, 2024 · 2 comments
Closed

nextjs deployment - window is not defined #147

brampurnot opened this issue May 20, 2024 · 2 comments

Comments

@brampurnot
Copy link

brampurnot commented May 20, 2024

Hi guys,

love this package. I have an issue though when deploying it to Vercel:

orchestrate:build: ReferenceError: window is not defined

21:59:34.871 | orchestrate:build: at file:///vercel/path0/node_modules/sequential-workflow-designer-react/lib/esm/index.js:53:1
21:59:34.871 | orchestrate:build: at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
21:59:34.871 | orchestrate:build: at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
21:59:34.872 | orchestrate:build: at async importModuleDynamicallyWrapper (node:internal/vm/module:429:15)
21:59:34.880 | orchestrate:build:

Any chance you could check if the window is not undefined? I was able to workaround it now by wrapping it in another component and then dynamically loading it but would be great if this could be solved in the future. If not, then we can just keep this as a reference for others.

Bram

@b4rtaz
Copy link
Collaborator

b4rtaz commented May 20, 2024

Hello @brampurnot,

yes, currently we recommend to import the designer with disabling the server side rendering. I added a new section here that describes it.

@brampurnot
Copy link
Author

Awesome thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants