Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solid-query does not work in NX monorepo #4250

Closed
Stevedohh opened this issue Oct 1, 2022 · 4 comments
Closed

solid-query does not work in NX monorepo #4250

Stevedohh opened this issue Oct 1, 2022 · 4 comments

Comments

@Stevedohh
Copy link

Stevedohh commented Oct 1, 2022

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

@TkDodo
Copy link
Collaborator

TkDodo commented Oct 1, 2022

@Stevedohh
Copy link
Author

Could this be related to:

and:

?

Unfortunately no. Changing versions of "vite-plugin-solid" and "vite" did not help. Any ideas what it might be?

@Stevedohh
Copy link
Author

Regarding this issue
solidjs/vite-plugin-solid#41
I excluded deps in vite config and it helps

Thanks @TkDodo for mentioning related issues!

@ardeora
Copy link
Contributor

ardeora commented Oct 1, 2022

Glad that helped! I also have added a PR here #4255 that will make solid-query work by default without using the excluded deps fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants