Skip to content

solid-query does not work in NX monorepo #4250

@Stevedohh

Description

@Stevedohh

Describe the bug

The QueryClientProvider from solid-query does not work properly in NX monorepo.

When I'm trying to use QueryClientProvider I see the "React is not defined" error

image

Your minimal, reproducible example

https://github.com/Stevedohh/nx-with-solid-query

Steps to reproduce

  1. Go to https://github.com/Stevedohh/nx-with-solid-query and clone it
  2. Run npm i in root directory
  3. Run npm run start-solid-app
  4. Open the runnable app
  5. Observe "Uncaught ReferenceError: React is not defined" in console tab

Expected behavior

As a user, I want not to see any errors in the console. And works with the library in a proper way.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Windows 10

react-query version

@tanstack/solid-query ^4.8.0

TypeScript version

~4.8.2

Additional context

The App component with QueryClientProvider located in apps/solid-app/src/App.tsx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions