Error on run app with with wasp start due to dependency installation

Hello guys, i am having a hard time here stating my wasp project. I was coding a few days ago, installed some dependencies with the --legacy-peer-deps flag and kept going. Today i came back to write a few more lines of code but the app wont start due to the dependency error... this arre the ones failing right now :
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0",
Is there any way to upgrade react version or anyone found a way to overcome this situation? When ever i try to start the app it fails and since i cant pass the flas with the wasp start commad i am stuck without other options right now
No description
4 Replies
kapa.ai
kapa.ai2mo ago
Hi @Stefan Vitória. 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 information provided in the knowledge sources, I can offer some insights and potential solutions to your dependency installation issue with Wasp. Currently, Wasp has some limitations when it comes to managing dependencies and their versions. As mentioned in the project dependencies documentation (https://wasp-lang.dev/docs/project/dependencies), Wasp dictates exact versions of certain packages, including React. This means you can't choose the version of React you want to use, which might be causing conflicts with the @dnd-kit packages you're trying to install. Here are a few potential approaches to address your issue: 1. Check Wasp's React version: First, verify which version of React Wasp is currently using. You might need to align your dependencies with this version. 2. Use a canary version: There's a mention of a canary version of Wasp that uses React 18 in a GitHub issue comment (https://github.com/wasp-lang/wasp/issues/723). You could try using this version if it's compatible with your project and the @dnd-kit packages. 3. Wait for an update: The Wasp team is aware of these dependency issues and is working on a restructuring to solve them. You can follow the progress on GitHub issue #734 (https://github.com/wasp-lang/wasp/issues/734). 4. Manual installation (not recommended): As a temporary workaround, you could try manually installing the dependencies using npm install with the --legacy-peer-deps flag in your project directory. However, this is not an ideal solution and may cause issues down the line. 5. Contact Wasp support: If none of these solutions work, you might want to reach out to the Wasp community or create a GitHub issue for more specific help with your project. It's important to note that Wasp is actively working on improving dependency management. In the future, as mentioned in a GitHub issue (https://github.com/wasp-lang/wasp/issues/1597), Wasp projects will have a top-level package.json and node_modules, which should make dependency management more flexible. For now, the best course of action might be to align your dependencies with the versions that Wasp supports, or consider using a more recent version of Wasp if available. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Stefan Vitória, 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?
martinsos
martinsos2mo ago
Seems like you have some deps that are pulling in too new version of react (19). You can't upgrade React in Wasp till Wasp upgrades it since it is such a central library. So, you gotta figure out which packages are the cause here and downgrade them. dnd-kit/core seems like it might be problematic. I see also react-router-dom 19 being metnioned, not sure if that is pulled in by it or is standalone.
Stefan Vitória
Stefan VitóriaOP2mo ago
i think react-router-dom 19 is being pulled by it, i didnt install it. Not understanding why it would it
martinsos
martinsos2mo ago
Ok, then that library needs react-router-dom 19 so it tries to pull it in. Have you tried downgrading those libraries then,the dnd ones?

Did you find this page helpful?