Replies: 3 comments
-
everything before 4.3.0 is pretty broken when it comes to bundling, so I recommend upgrading. it's likely a problem with peerDependencies, pnpm v8 has this fixed. There's also a flag to opt in for v7. it's this issue: |
Beta Was this translation helpful? Give feedback.
-
It was not actually a Made it work, by defining
By adding
|
Beta Was this translation helpful? Give feedback.
-
wild that this worked for me |
Beta Was this translation helpful? Give feedback.
-
I have a
turborepo
monorepo that contains a CRA, and a Next app. On the packages side, 2 packages are usingreact-query
which are built usingtsup
and consumed in the applications.I'm having the same issue now (again) that I had before when once upgraded to
v4.2.3
withturborepo
andpnpm
. and now after upgrading fromv4.2.3
to the latest (or tov4.3.0
in particular)I managed back then to make them link to only one package via
hoisting
andpeerDependencies
.Now, I have validated that they are still one linking to one package but somehow the final build includes two versions of react-query when searching for the occurrence of
throw new Error("No QueryClient set, use QueryClientProvider to set one");
I made sure other packages within the monorepo that are dependent to react-query are all the same version.Not sure what happened from
v4.3.0
for that to affect the final build. It's not an option as well to stay onv4.2.3
as now we rely on the newuse client
implementation for the Nextapp directory
Any take on that?
Beta Was this translation helpful? Give feedback.
All reactions