-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Unable to use @tanstak/react-query in a monorepo - nx #5445
Comments
please update nextjs. "Cannot read properties of null (reading useEffect)" was an issue in nextJs: the reproduction uses let me know if that doesn't fix it |
Thank you for this but I am still having the same issue. I have updated the repo, you can have a look. I will ask them to re-open this issue on the next repo. |
Up. Does anyone still have this issue? |
Hey @aleczratiu, updating the |
Hey @MathurAditya724 I'm using monorepo, it seems that I had 2 @tanstak/react-query packages, one on the package.json from the root and another one inside of the website project. After I removed the package from the package.json root it seems not to complain anymore, not sure what the cause was there but it resolved my issue for now. |
Describe the bug
my team and I are trying to shift all our application's codebase to
nx
, but due to some problem with Tanstack react query it is showingInvalid hook call
.We tried creating a new repo and removed the shared-ui lib (cause we thought it might be the cause of the
peerDependencies
as mentioned hereWe were able to run it when had a standalone next app created using
create-next-app
In the attached repo the code is very simple, it's just
we tried this with macOS also thinking it might be a Windows error but apparently, it was not
Your minimal, reproducible example
https://github.com/MathurAditya724/tanstack_error
Steps to reproduce
Expected behavior
The application code we have given in the repo should just work, Idk if it's a config issue or a problem with
nx
. We were just creating the repo with the nx guide to create an integrated mono repo.How often does this bug happen?
Every time
Screenshots or Videos
Platform
Tanstack Query adapter
react-query
TanStack Query version
v4.29.7
TypeScript version
~5.0.2
Additional context
No response
The text was updated successfully, but these errors were encountered: