Skip to content
Source
Sign inSign up
TanStack/query

declares 'QueryClient' locally, but it is not exported #8475

Send to my agent
Closedsysmat(GitHub profile, opens in a new tab) opened this issue 4 comments

Describe the bug

Module '"@tanstack/angular-query-experimental"' declares 'QueryClient' locally, but it is not exported.ts(2459) index.d.ts(1, 447): 'QueryClient' is declared here.

Your minimal, reproducible example

https://tanstack.com/query/latest/docs/framework/angular/quick-start

Steps to reproduce

https://tanstack.com/query/latest/docs/framework/angular/quick-start

Expected behavior

import must work and ts must be happy

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • win 11

Tanstack Query adapter

angular-query

TanStack Query version

"@tanstack/angular-query-experimental": "^5.62.9",

TypeScript version

5.6.3

Additional context

No response

  1. arnoud-dv(GitHub profile, opens in a new tab) added labelspackage: angular-query

  2. arnoud-dv(GitHub profile, opens in a new tab) added labelspackage: angular-query-experimental

  3. I need a reproduction to be able to look into this. If you provide one and it's not the issue described below I'll reopen it.

    I have seen this error only on Stackblitz when it's not run as webcontainers. To confirm it uses webcontainers, click the gear icon to open settings. It should show webcontainers as in the screenshot, NOT Angular as that is an obsolete template that actually does not work great with recent versions of Angular.

    Image
  4. arnoud-dv(GitHub profile, opens in a new tab) added labelsneeds-info

  5. it seams my ts config was problem

  6. it seams my ts config was problem

    Thank you for the update and good to know it works for you now. What setting did you change? Maybe it's worth adding it to the docs.

    • old conf:
    "baseUrl": "./",
    "forceConsistentCasingInFileNames": true,
    "moduleResolution": "node",
    "useDefineForClassFields": false,
    "moduleResolution": "node",
    • for new conf I copy what ng create do it ("skipLibCheck": true, "isolatedModules": true, "moduleResolution": "bundler",)
    • I didn't play with which conf prop broke

Sign in to join this conversation.