Skip to content

@clerk/nextjs 7.2.8 breaks with e.isFetched' is undefined #8428

Description

@CodingFabian

After Upgrading 7.2.7 to 7.2.8 our website broke with:

TypeError: e.isFetched is not a function. (In 'e.isFetched()', 'e.isFetched' is undefined)

Claude investigated this:

Root cause: The @clerk/nextjs@7.2.7 → 7.2.8 bump brought in @clerk/shared@4.8.6, which changed its @tanstack/query-core dependency from the exact pin 5.90.16 to the range ^5.90.16. That resolved to 5.100.6, which added isFetched() as a new method on the Query class and has the QueryObserver call query.isFetched().

Why only production: Clerk's production JS SDK (loaded when __client_uat cookie is present) bundles its own @tanstack/query-core internally (an older version without isFetched()). When @clerk/shared@4.8.6's QueryObserver (from 5.100.6) tries to observe queries from that bundled QueryClient, it calls query.isFetched() on a Query object that doesn't have that method → undefined is not a function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions