Skip to content

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

Closed as not planned
@vanyaxk

Description

@vanyaxk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsupstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions