W
Wasp-lang•2d ago
cmilazzo

react-router-dom version

I'm getting an error when compiling: Error: Dependency conflict for user dependency (react-router-dom, ^6.28.0): Version must be set to the exactly the same version as the one wasp is using: ^5.3.3 I need features of the react-router-dom that were added after the version wasp is using. How do I update wasp to use a newer version of react-router-dom?
2 Replies
kapa.ai
kapa.ai•2d ago
Hi @cmilazzo. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I understand your frustration with the dependency conflict for react-router-dom. Unfortunately, as of now, Wasp does not allow users to specify a different version of react-router-dom than the one it uses internally. According to the Wasp documentation on dependencies (https://wasp-lang.dev/docs/project/dependencies), Wasp currently dictates exact versions of certain packages, including react-router-dom. If you try to specify a different version, you'll get the error message you encountered. The Wasp team is aware of this limitation and is working on a solution. There's an open issue Allow specifying npm dependency that Wasp already uses, with different version (https://github.com/wasp-lang/wasp/issues/59) that discusses this exact problem. The proposed solution involves using npm aliases to allow different versions of the same package. For now, there isn't a straightforward way to update Wasp to use a newer version of react-router-dom. You're limited to the version that Wasp is using internally (^5.3.3 in your case). The Wasp team is actively working on restructuring to solve this and other related issues. You can follow their progress on issue #734 (https://github.com/wasp-lang/wasp/issues/734). In the meantime, you might need to find workarounds that don't rely on the newer features of react-router-dom, or consider if your project requirements allow you to use the version that Wasp supports. I apologize that I don't have a more immediate solution for you. This is a known limitation of the current version of Wasp, and the team is working on improving it in future releases. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @cmilazzo, 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?
cmilazzo
cmilazzoOP•2d ago
:(. 😭
Want results from more Discord servers?
Add your server