authTables Error
Hello, well I'm trying to use authTables in a clean schema (clean project) but throw me an error...
im using convex as a package (turborepo)
I'm using:
"@auth/core": "^0.40.0",
"@convex-dev/auth": "^0.0.89",
"convex": "^1.27.1"
Error:
Argument of type '{ users: TableDefinition<VObject<{ name: string; email: string; phone: string; image: string; emailVerificationTime: number; phoneVerificationTime: number; }, { name: VString<string, "required">; email: VString<...>; phone: VString<...>; image: VString<...>; emailVerificationTime: VFloat64<...>; phoneVerificationTim...' is not assignable to parameter of type 'GenericSchema'.
Property 'authSessions' is incompatible with index signature.
Type 'TableDefinition<VObject<{ userId: Id<"users">; expirationTime: number; }, { userId: VId<Id<"users">, "required">; expirationTime: VFloat64<number, "required">; }, "required", "userId" | "expirationTime">, { ...; }, {}, {}>' is not assignable to type 'TableDefinition<Validator<any, any, any>, {}, {}, {}>'.
Types have separate declarations of a private property 'indexes'.ts(2345)
Can anyone help me or guideme to fix this problem?
thanks!


14 Replies
typescript things
if you want to remove the table and use your own, try:
if you want to add some details to the users table, try:
But then the error doesn't matter?
can you copy the error message from the second screenshot? sorry I didn't read the second one
If I had to guess, you should run
pnpm dlx convex dev
to update types in your terminal
is this just for adding the authTables declaration?yeap
if i remove, the error gone

what happens if you restart the ts server?
same
this is what happend when i rewrite
...authTables

I think your IDE might be rigged
can you do command+p + shift and restart the ts server again?
same
idk what its happening
do you have some sort of extention downloaded on VScode? cause that error is a bit too harsh
we can see that its being updated just fine
Its a bit too late for me, so I'm out for tonight
wasa thing with ts and my packages
I solved it thanks to you telling me it would be a typescript problem. "typescript things"
I have to extend my tsconfig.json from my workspace
I don't know how well I did this, but it works