require() of ES Module is not supported planetscale serverless + sveltekit

Hi, I am getting this error when I user planetscale serverless with drizzle orm
require() of ES Module D:\svelte-edge\node_modules\@planetscale\database\dist\index.js from D:\svelte-edge\node_modules\drizzle-orm\planetscale-serverless\session.js not supported.
Instead change the require of index.js in D:\svelte-edge\node_modules\drizzle-orm\planetscale-serverless\session.js to a dynamic import() which is available in all CommonJS modules.
require() of ES Module D:\svelte-edge\node_modules\@planetscale\database\dist\index.js from D:\svelte-edge\node_modules\drizzle-orm\planetscale-serverless\session.js not supported.
Instead change the require of index.js in D:\svelte-edge\node_modules\drizzle-orm\planetscale-serverless\session.js to a dynamic import() which is available in all CommonJS modules.
3 Replies
Dan
Dan2y ago
It's fixed in drizzle-orm@beta
SPS | Shootmail
SPS | ShootmailOP2y ago
Great I will try that out Great, this is working.
Gandalf the Gray
I have tried installing drizzle-orm@beta and I am still getting the same error with Nest js and planetscale
Want results from more Discord servers?
Add your server