Skip to content

@clerk/nextjs 7.2.8 breaks #8428

@CodingFabian

Description

@CodingFabian

Preliminary Checks

Description

After Upgrading 7.2.7 to 7.2.8 our website broke:

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions