#[SOLVED]NextAuth with drizzle orm error: getUserByAccounT

19 messages · Page 1 of 1 (latest)

frigid crane
#

So this is the error:

https://pastebin.com/wt7dw3ZW
(or [next-auth][error][adapter_error_getUserByAccount]
https://next-auth.js.org/errors#adapter_error_getuserbyaccount relation "account" does not exist {
message: 'relation "account" does not exist',
....}

My schema.ts:
https://pastebin.com/Eu31NGnm

and my nextauth config: https://pastebin.com/AD8E4UEU

This is a list of errors output from NextAuth.js.

#

related to #1160587986858156154 with @blissful totem and @limber shell

limber shell
#
// schema.ts

-const accounts = pgTable(
+export const accounts = pgTable(
-const sessions = pgTable(
+export const sessions = pgTable(
-const verificationTokens = pgTable(
+export const verificationTokens = pgTable(
#

remove drizzle folder, and run that package.json commands to generate, push db and run dev server

frigid crane
#

and I get this schéma from official doc

frigid crane
#

I found the error:
With t3 stack, tables are composed like that:
{projetname}_table

#

but nextauth is searching in 'table'

#

so myprojet_account != account

frigid crane
limber shell
#

now you can mark this as solved and remove it

frigid crane
#

[SOLVED]NextAuth with drizzle orm error: getUserByAccounT