You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing a weird issue related to imports when using drizzle-orm/planetscale-serverless.
Error when evaluating SSR module /src/db/index.ts: failed to import "drizzle-orm/planetscale-serverless"
[vite] Error when evaluating SSR module /Users/my-user-account/Documents/projects/my-project-name/src/pages/api/auth/[...auth].ts:
error require() of ES Module /Users/my-user-account/Documents/projects/my-project-name/node_modules/@planetscale/database/dist/index.js from /Users/my-user-account/Documents/projects/my-project-name/node_modules/drizzle-orm/planetscale-serverless/session.js not supported.
Instead change the require of index.js in /Users/my-user-account/Documents/projects/my-project-name/node_modules/drizzle-orm/planetscale-serverless/session.js to a dynamic import() which is available in all CommonJS modules.
I've researched this issue and found that only the types are used (which is good), but in the build session.js file a require("@planetscale/database"); is found. Removing that line actually resolves the issue entirely. I'm unsure how this issue is created, but I hope there are some smart tsconfig people here to resolve it.
The text was updated successfully, but these errors were encountered:
What version of
drizzle-orm
are you using?0.22.0
Describe the Bug
I'm experiencing a weird issue related to imports when using
drizzle-orm/planetscale-serverless
.I've researched this issue and found that only the types are used (which is good), but in the build session.js file a
require("@planetscale/database");
is found. Removing that line actually resolves the issue entirely. I'm unsure how this issue is created, but I hope there are some smart tsconfig people here to resolve it.The text was updated successfully, but these errors were encountered: