Issue migrating to Wasp TypeScript config
Hi!
I'm encountering an issue migrating my Wasp v0.15.0 proejct to the new Wasp TypeScript config.
I'm following the guide in the docs (https://wasp-lang.dev/docs/general/wasp-ts-config) but running into an issue at step 8:
Wasp TypeScript config (*.wasp.ts) | Wasp
This document assumes your app works with Wasp >= 0.15.
4 Replies
Hi @WWWillems. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Using the
--force
or --legacy-peer-deps
flags don't help as the wasp
command doesn't recognize them.
My project is using dnd-kit
& a lot of shadcn
components which rely on radix
, both dnd-kit
and radix
have a dependency on React 19.
I've managed to workaround these dependencies by adding this config to my package.json
:
Any ideas/suggestions?----------------------
The issue you're encountering during the migration to Wasp TypeScript config is related to a dependency conflict between React versions. Based on the error message, it appears that there's a mismatch between the required React versions for different dependencies in your project.
The error suggests that you have React 18.3.1 installed, but react-dom 19.0.0 is expecting React 19.0.0. This kind of version mismatch can cause problems during installation and setup.
To resolve this issue, you can try the following steps:
1. First, make sure your
package.json
file in the root of your Wasp project specifies the correct versions of React and React DOM. They should be compatible versions, typically the same major version. For example:
2. If updating the versions in package.json
doesn't resolve the issue, you can try running the wasp ts-setup
command with the --legacy-peer-deps
flag, as suggested in the error message:
This flag tells npm to ignore peer dependency conflicts and may allow the installation to complete.
3. If the above steps don't work, you might need to manually resolve the dependency conflicts by updating other packages that depend on specific React versions.
It's worth noting that the error message mentions React 19.0.0, which is not an officially released version as of now. This could indicate an issue with how the dependencies are specified in your project or in one of the packages you're using.
If you continue to face issues, you may want to check the Wasp GitHub issues to see if others have reported similar problems or to report this issue yourself.
Remember, when migrating or updating dependencies, it's always a good idea to back up your project before making changes.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @WWWillems, 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?@WWWillems that was a great workaround and it's something I'd suggest in the end. Until we upgrade to React 19: https://github.com/wasp-lang/wasp/issues/2482 your best bets are either use older versions that use React 18 or override deps like you did. Hope this work for you 🙂
GitHub
Migrate to React 19 · Issue #2482 · wasp-lang/wasp
React 19 is the latest version as of now and we should migrate to it. It doesn't seem there are a lot of breaking changes but we should investigate how does the bump affect Wasp's code and ...