W
Wasp•5d ago
Nuclearvodka

Wasp uses tanstack v4, while another dependency I'm importing using V5, anyway to do both?

wasp version: 0.15.2 As the title states above, wasp uses v4 so my useQuery is in V4, I require another component that uses V5, when using the component I get a lot of missing states because of the verison miss match.
4 Replies
kapa.ai
kapa.ai•5d ago
Hi @Nuclearvodka. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, I can address your question about using different versions of Tanstack Query (React Query) in a Wasp project. Currently, Wasp does not allow using different versions of the same dependency that it already uses internally. This limitation is mentioned in the Wasp documentation on dependencies:
In the current version of Wasp, if Wasp is already internally using a certain dependency (e.g. React) with a certain version specified, you are not allowed to define that same npm dependency yourself while specifying a different version.
This means that you cannot use both Tanstack Query v4 (used by Wasp) and v5 (required by your other component) in the same project at the moment. However, the Wasp team is aware of this limitation and is working on a solution. There's an open issue on GitHub addressing this problem: Allow specifying npm dependency that Wasp already uses, with different version. The proposed solution involves using npm aliases to allow different versions of the same package. However, this feature is not yet implemented. For now, you have a few options: 1. Use only the version of Tanstack Query that Wasp provides (v4). 2. Try to find a way to make your component work with Tanstack Query v4. 3. Wait for the Wasp team to implement the solution for using multiple versions of the same dependency. The Wasp team is actively working on improving dependency management, as mentioned in the issue: Fix dependency version checking. Unfortunately, there's no immediate solution to use both versions simultaneously in your Wasp project (version 0.15.2) at this time. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Nuclearvodka, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
matijash
matijash•5d ago
hmm, I see. As Kapa said, we had to make some versions fixed for now, although we'll definitely upgrade soon to v5. Can you share the exact component in question that requires v5? @miho for more details on this and potentially some ideas
miho
miho•5d ago
Yep as @matijash said knowing the exact component would help 🙂
Nuclearvodka
NuclearvodkaOP•3d ago
It's an external component that has nothing to do with wasp, it's a fuels-react library, was working on an authentication system using a specific blockchain wallet.

Did you find this page helpful?