drizzle adapter failing

a newly scaffolded project gave this error on auth.ts
Type 'import("/Users/a3tech/Developer/personal_projects/pathways/node_modules/.pnpm/@[email protected]/node_modules/@auth/core/adapters").Adapter' is not assignable to type 'import("/Users/a3tech/Developer/personal_projects/pathways/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/adapters").Adapter'.
Types of property 'createUser' are incompatible.
Type '((user: AdapterUser) => Awaitable<AdapterUser>) | undefined' is not assignable to type '((user: Omit<AdapterUser, "id">) => Awaitable<AdapterUser>) | undefined'.
Type '(user: AdapterUser) => Awaitable<AdapterUser>' is not assignable to type '(user: Omit<AdapterUser, "id">) => Awaitable<AdapterUser>'.
Types of parameters 'user' and 'user' are incompatible.
Property 'id' is missing in type 'Omit<AdapterUser, "id">' but required in type 'AdapterUser'.ts(2322)
Type 'import("/Users/a3tech/Developer/personal_projects/pathways/node_modules/.pnpm/@[email protected]/node_modules/@auth/core/adapters").Adapter' is not assignable to type 'import("/Users/a3tech/Developer/personal_projects/pathways/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next-auth/adapters").Adapter'.
Types of property 'createUser' are incompatible.
Type '((user: AdapterUser) => Awaitable<AdapterUser>) | undefined' is not assignable to type '((user: Omit<AdapterUser, "id">) => Awaitable<AdapterUser>) | undefined'.
Type '(user: AdapterUser) => Awaitable<AdapterUser>' is not assignable to type '(user: Omit<AdapterUser, "id">) => Awaitable<AdapterUser>'.
Types of parameters 'user' and 'user' are incompatible.
Property 'id' is missing in type 'Omit<AdapterUser, "id">' but required in type 'AdapterUser'.ts(2322)
2 Replies
depressedalchemist.
I have the same issue, did you solve it?
Liltripple_reid
Liltripple_reidOP11mo ago
I created another t3 project and it seems fixed now however you will get this error when trying to build it
Generating static pages (0/4) [ ]x [TRPCClientError]: Dynamic server usage: Page couldn't be rendered statically because it used `cookies`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error
at x.from (/Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:1:27917)
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:1636 {
meta: undefined,
shape: undefined,
data: undefined,
[cause]: n [Error]: Dynamic server usage: Page couldn't be rendered statically because it used `cookies`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error
at s (/Users/a3tech/Developer/personal_projects/pathways/.next/server/chunks/362.js:1:4931)
at d (/Users/a3tech/Developer/personal_projects/pathways/.next/server/chunks/362.js:1:2674)
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:4513
at /Users/a3tech/Developer/personal_projects/pathways/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:179176
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:5393
at Object.subscribe (/Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:1:26763)
at Object.subscribe (/Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:5167)
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:5295
at Object.subscribe (/Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:1:26763)
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:881 {
digest: 'DYNAMIC_SERVER_USAGE'
}
}
Generating static pages (0/4) [ ]x [TRPCClientError]: Dynamic server usage: Page couldn't be rendered statically because it used `cookies`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error
at x.from (/Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:1:27917)
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:1636 {
meta: undefined,
shape: undefined,
data: undefined,
[cause]: n [Error]: Dynamic server usage: Page couldn't be rendered statically because it used `cookies`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error
at s (/Users/a3tech/Developer/personal_projects/pathways/.next/server/chunks/362.js:1:4931)
at d (/Users/a3tech/Developer/personal_projects/pathways/.next/server/chunks/362.js:1:2674)
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:4513
at /Users/a3tech/Developer/personal_projects/pathways/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:179176
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:5393
at Object.subscribe (/Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:1:26763)
at Object.subscribe (/Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:5167)
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:5295
at Object.subscribe (/Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:1:26763)
at /Users/a3tech/Developer/personal_projects/pathways/.next/server/app/page.js:5:881 {
digest: 'DYNAMIC_SERVER_USAGE'
}
}
it's unrelated to drizzle (trpc or nextjs maybe) but it does occur
Want results from more Discord servers?
Add your server