Skip to content

Type error after following documentation #95

@pulgueta

Description

@pulgueta

I started a migration from a project to Convex and since I started using Better-Auth and is now possible with Convex, I went all-in. But after following the steps in the documentation, I still had a type error which wouldn't go away, even after thinking I had to bun dev beforehand.

The code:

Image

The error (on line 35):

Argument of type 'GenericQueryCtx<{ barbershops: { document: { _id: Id<"barbershops">; _creationTime: number; description?: string | undefined; coordinates?: { x: number; y: number; } | undefined; contactPhone?: string | undefined; ... 13 more ...; state: string; }; fieldPaths: ExtractFieldPaths<...> | "_id"; indexes: { ...; }; searc...' is not assignable to parameter of type 'GenericCtx<{ barbershops: { document: { _id: Id<"barbershops">; _creationTime: number; description?: string | undefined; coordinates?: { x: number; y: number; } | undefined; contactPhone?: string | undefined; ... 13 more ...; state: string; }; fieldPaths: ExtractFieldPaths<...> | "_id"; indexes: { ...; }; searchInde...'.
  Type 'GenericQueryCtx<{ barbershops: { document: { _id: Id<"barbershops">; _creationTime: number; description?: string | undefined; coordinates?: { x: number; y: number; } | undefined; contactPhone?: string | undefined; ... 13 more ...; state: string; }; fieldPaths: ExtractFieldPaths<...> | "_id"; indexes: { ...; }; searc...' is missing the following properties from type 'GenericMutationCtx<{ barbershops: { document: { _id: Id<"barbershops">; _creationTime: number; description?: string | undefined; coordinates?: { x: number; y: number; } | undefined; contactPhone?: string | undefined; ... 13 more ...; state: string; }; fieldPaths: ExtractFieldPaths<...> | "_id"; indexes: { ...; }; se...': scheduler, runMutationts(2345)

Repo: https://github.com/pulgueta/panabarbero/blob/convex/apps/convex/convex/auth.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions