TanStack / query

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.
https://tanstack.com/query
MIT License
42.5k stars 2.91k forks source link

Warning when building Error import #8137

Closed rever96 closed 1 month ago

rever96 commented 1 month ago

Describe the bug

My project is a react vite project with these dependencies:

    "@tanstack/react-query": "5.59.0",
    "@uidotdev/usehooks": "2.4.1",
    "axios": "1.7.7",
    "clsx": "^2.1.1",
    "formik": "^2.4.6",
    "i18next": "23.14.0",
    "i18next-browser-languagedetector": "8.0.0",
    "iconsax-react": "^0.0.8",
    "import": "^0.0.6",
    "lodash": "4.17.21",
    "nodemon": "^3.1.7",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-error-boundary": "4.0.13",
    "react-fast-marquee": "^1.6.5",
    "react-i18next": "15.0.1",
    "react-icons": "5.3.0",
    "react-number-format": "^5.4.2",
    "react-router": "6.26.1",
    "react-router-dom": "6.26.1",
    "react-select": "^5.8.1",
    "react-toastify": "10.0.5",
    "sass": "^1.79.3",
    "zustand-x": "3.0.4"

I see this :

bun run build
$ vite build
vite v5.4.2 building for production...
Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/legacy-js-api

node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
node_modules/@tanstack/react-query/build/modern/useBaseQuery.js (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
transforming (176) node_modules/@noble/curves/esm/abstract/edwards.jsDeprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/legacy-js-api

Your minimal, reproducible example

haven't

Steps to reproduce

bun run build

Expected behavior

no warnings when building

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

i'm building from a mac

Tanstack Query adapter

react-query

TanStack Query version

5.59.0

TypeScript version

5.5.4

Additional context

No response

TkDodo commented 1 month ago

it’s a vite issue because of ’use client’ directives: