openblocks-dev / openblocks

🔥 🔥 🔥 The Open Source Retool Alternative

Home Page:https://cloud.openblocks.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openblocks-sdk does not work with nextjs

mingfang opened this issue · comments

openblocks-sdk does not work with nextjs.
Getting this error

error - ReferenceError: window is not defined
    at file:///home/projector-user/IdeaProjects/next-openblocks-test/node_modules/openblocks-sdk/dist/36af6c29.js:2239:53
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
  page: '/'
}

I create this repo to demonstrate the problem.
https://github.com/mingfang/next-openblocks-test

commented

@mingfang Thanks for reporting this, I will release a new version of SDK soon.

But it can only be used as dynamic import as well.

commented

@mingfang Try openblocks-sdk@0.0.40.

@sarike
I can confirm that dynamic import works now. Thanks.
Please push the code.

Also are there plans to make the sdk work without dynamic import?

@sarike
I can confirm that dynamic import works now. Thanks.
Please push the code.

Also are there plans to make the sdk work without dynamic import?

@sarike
I can confirm that dynamic import works now. Thanks.
Please push the code.

Also are there plans to make the sdk work without dynamic import?