Skip to content
Source
Sign inSign up
TanStack/query

[@tanstack/react-query] Rollup errors when building on Node 18.15.0 #5273

Send to my agent
Closedvanyaxk(GitHub profile, opens in a new tab) opened this issue 1 comment

Describe the bug

I have a Vite project, and recently upgraded Node to 18.15.0 - when running build, Rollup spams warnings like these:

Module level directives cause errors when bundled, "use client" in "node_modules/@tanstack/react-query/build/lib/*" was ignored.

Your minimal, reproducible example

https://codesandbox.io/p/sandbox/festive-lamarr-v5drv6

Steps to reproduce

  1. Go to reproduction link.
  2. Run build command
  3. Observe the mentioned warnings during the module transformation phase

Expected behavior

There should be no warnings of this sort

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

System: OS: macOS 13.3.1 CPU: (8) arm64 Apple M1 Pro Memory: 2.75 GB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm npmPackages: vite: ^4.2.1 => 4.2.1

Tanstack Query adapter

None

TanStack Query version

4.29.1

TypeScript version

No response

Additional context

No response

  1. it's not an error but a warning, and it's an upstream issue with vite not understanding 'use client' directive.

    You can ignore it, vite is working on a resolution. It has also been reported a bunch of times before:

  2. TkDodo closed this

  3. TkDodo added labelsduplicate

  4. TkDodo added labelsupstream

Sign in to join this conversation.