Dependency hell
Trying to install a package, and it wants to update react-router-dom. I've been in somewhere around the 5th ring of hell for the last hour, the path to Nirvana is entirely unclear as Wasp takes a massive π© when the version of react-router-dom != 5.3.3. What to do, @kapa.ai?
10 Replies
Hi @Conspyre. 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 dependency issues. In Wasp, if it's already internally using a certain dependency (like
react-router-dom
) with a specific version, you're not allowed to define that same npm dependency yourself while specifying a different version. If you do that, you'll get an error message telling you which exact version you have to use for that dependency. This means Wasp dictates exact versions of certain packages, so you can't choose the version of react-router-dom
you want to use.
However, there's an ongoing effort to restructure this aspect of Wasp, which will solve this and some other quirks. You can follow the progress on issue #734 (https://github.com/wasp-lang/wasp/issues/734).
In the meantime, you might want to stick with the version of react-router-dom
that Wasp is using internally to avoid these issues. If you're experiencing a bug with a specific version of Wasp, it might be worth checking if the bug has been fixed in a later version. For example, a bug related to react-router-dom
was fixed in Wasp 0.12.3 according to a Github issue (https://github.com/wasp-lang/wasp/issues/1792).
If you're still having trouble, please consider opening an issue on the Wasp Github page (https://github.com/wasp-lang/wasp/issues) to get help from the Wasp community.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Conspyre, 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?So it seems that is it simply not possible to install packages if they are not compatible with / need a later version of this mysterious react-router-dom. I have to stand up another server and handle auth between wasp app and the new endpoint if this is the case.
Is this a typical pattern working with wasp, @kapa.ai ?
Let me check the knowledge base for you. One moment! :books:
----------------------
Wasp is designed to provide a streamlined development experience, and it's not typical to have to stand up another server or handle auth between Wasp and a new endpoint due to package compatibility issues.
However, as Wasp is still in beta, there might be some kinks or bugs as mentioned in the Wasp documentation (https://wasp-lang.dev/docs/project/testing). The issue you're facing with
react-router-dom
is a known limitation of the current version of Wasp, where it dictates the exact versions of certain packages.
The Wasp team is actively working on improving this aspect of the framework. For instance, there's an ongoing effort to restructure Wasp, which will solve this and some other quirks. You can follow the progress on issue #734 (https://github.com/wasp-lang/wasp/issues/734).
In the meantime, if you're facing issues with a specific package that requires a different version of react-router-dom
, you might want to check if there's an alternative package that's compatible with the version used by Wasp. If the issue persists, consider reaching out to the Wasp community on their Discord server (https://discord.gg/rzdnErX) or opening an issue on the Wasp Github page (https://github.com/wasp-lang/wasp/issues) for further assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Conspyre, 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?Why can't you install an older version of the package?
@neogeofun I spent an hour+ installing different versions of things and getting lost in the woods. I'm just not familiar with this "dependency hell" and I don't have a good strategy to solve it beyond blindly trying things. It seems rather a lot easier to just stand up another process. The server process with error handling is like 40 LOC or something. π
What is the package you are trying to install?
Hey, @Conspyre, @neogeofun is right, you should be able to do with the older version of react router until we merge the newest one (in the next couple of weeks).
Can you share details on what happens when you try to match Wasp's version?
I will have to switch gears to come back to this. Doing so causes another issue which I am posting separately. π
Sure, I'll be here π
I got this working and forget what the exact issue was. I am pretty sure it was me mistaking a ton of node version warnings for something to care deeply about. Now I'm using fluent-ffmpeg, coping with my node warnings, and life is good. If you find yourself giving AF about Node warnings, ask your Doctor for a scrip for Phucitol... π