T3 App type error

Hi guys, I just tried creating a new t3 app and I selected next-auth and drizzle. How can I fix this type error? TIA Type 'PgTableWithColumns<{ name: "user"; schema: undefined; columns: { id: PgColumn<{ name: "id"; tableName: "user"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [...]; baseColumn: never; }, {}, {}>; name: PgColumn<...>; email: PgColumn<...>; ...' is not assignable to type 'DefaultPostgresUsersTable'. Type 'PgTableWithColumns<{ name: "user"; schema: undefined; columns: { id: PgColumn<{ name: "id"; tableName: "user"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [...]; baseColumn: never; }, {}, {}>; name: PgColumn<...>; email: PgColumn<...>; ...' is not assignable to type 'PgTable<{ name: string; columns: { id: DefaultPostgresColumn<{ columnType: "PgVarchar" | "PgText" | "PgUUID"; isPrimaryKey: true; data: string; notNull: true; dataType: "string"; }>; name: DefaultPostgresColumn<...>; email: DefaultPostgresColumn<...>; emailVerified: DefaultPostgresColumn<...>; image: DefaultPostgres...'. The types of '_.config.columns.id' are incompatible between these types. Type 'PgColumn<{ name: "id"; tableName: "user"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [string, ...string[]]; baseColumn: never; }, {}, {}>' is not assignable to type 'DefaultPostgresColumn<{ columnType: "PgVarchar" | "PgText" | "PgUUID"; isPrimaryKey: true; data: string; notNull: true; dataType: "string"; }>'.
No description
Solution:
nah, wans't really referring to t3 hahahaa. Its just an expression out of frustration. I did some research and I think my problem isn't caused by t3 at all, its because of the adapter just not having the right type.
Jump to solution
18 Replies
JulieCezar
JulieCezar2mo ago
How did you create the tables? Did you choose the right PG lib from Drizzle for creating tables?
Sidarth
Sidarth2mo ago
Even I'm facing the same error. Used the exact adapter that is given in next auth documentation. By the way I did not even edit anything from the scaffolded code
JulieCezar
JulieCezar2mo ago
Idk if you are using the t3 template... If not, if you set it up through the CLI you will see a working solution
Sidarth
Sidarth2mo ago
I set it with the CLI and nothing more
JustCodeItAll
JustCodeItAll2mo ago
I think this is the same error I’m having as well
Salumsu
Salumsu2mo ago
haven't touched anything, its the default t3 app with next auth and drizzle I did use it same dude, I have no idea how to fix it
JustCodeItAll
JustCodeItAll2mo ago
I created the secret key, from the command it gives about the db url, it took other errors away. But still don’t login using discord
Salumsu
Salumsu2mo ago
how did you do that? have you added the client id and secret id? I mean, how do you even use next auth properly? the setup in t3 app is different compared to what I'm used to.. the NextAuth is returning any, how do I get the handlers, signIn, signOut, etc.? Can someone please teach me
JustCodeItAll
JustCodeItAll2mo ago
The T3app command, has a command for the db to run in the terminal, it creates a key to paste in
Salumsu
Salumsu2mo ago
are you talking about the npx auth secret?
Salumsu
Salumsu2mo ago
The tables are declared like this
No description
No description
Salumsu
Salumsu2mo ago
but even when I change it to pgTable, the error doesn't go away
No description
JustCodeItAll
JustCodeItAll2mo ago
Yes Mine is erroring that “user” isn’t found
Salumsu
Salumsu2mo ago
This sucks dude haahahha
JustCodeItAll
JustCodeItAll2mo ago
T3? I’ve pretty much abandoned it
Want results from more Discord servers?
Add your server