W
Wasp2mo ago
WWWillems

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 ts-setup

[ Wasp !] npm ERR! code ERESOLVE
[ Wasp !] npm ERR! ERESOLVE unable to resolve dependency tree
[ Wasp !] npm ERR!
[ Wasp !] npm ERR! While resolving: promptpanda@undefined
[ Wasp !] npm ERR! Found: [email protected]
[ Wasp !] npm ERR! node_modules/react
[ Wasp !] npm ERR! react@"^18.2.0" from the root project
[ Wasp !] npm ERR! peer react@">=16.8.0" from @dnd-kit/[email protected]
[ Wasp !] npm ERR! node_modules/@dnd-kit/core
[ Wasp !] npm ERR! @dnd-kit/core@"^6.3.1" from the root project
[ Wasp !] npm ERR!
[ Wasp !] npm ERR! Could not resolve dependency:
[ Wasp !] npm ERR! peer react@"^19.0.0" from [email protected]
[ Wasp !] npm ERR! node_modules/react-dom
[ Wasp !] npm ERR! peer react-dom@">=16.8.0" from @dnd-kit/[email protected]
[ Wasp !] npm ERR! node_modules/@dnd-kit/core
[ Wasp !] npm ERR! @dnd-kit/core@"^6.3.1" from the root project
[ Wasp !] npm ERR!
[ Wasp !] npm ERR! Fix the upstream dependency conflict, or retry
[ Wasp !] npm ERR! this command with --force or --legacy-peer-deps
[ Wasp !] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
[ Wasp !] npm ERR!
[ Wasp !] npm ERR!
[ Wasp !] npm ERR! For a full report see:
[ Wasp !] npm ERR! /Users/wwwillems/.npm/_logs/2025-02-01T13_24_12_421Z-eresolve-report.txt
[ Wasp !]
[ Wasp !] npm ERR! A complete log of this run can be found in: /Users/wwwillems/.npm/_logs/2025-02-01T13_24_12_421Z-debug-0.log
➜ wasp ts-setup

[ Wasp !] npm ERR! code ERESOLVE
[ Wasp !] npm ERR! ERESOLVE unable to resolve dependency tree
[ Wasp !] npm ERR!
[ Wasp !] npm ERR! While resolving: promptpanda@undefined
[ Wasp !] npm ERR! Found: [email protected]
[ Wasp !] npm ERR! node_modules/react
[ Wasp !] npm ERR! react@"^18.2.0" from the root project
[ Wasp !] npm ERR! peer react@">=16.8.0" from @dnd-kit/[email protected]
[ Wasp !] npm ERR! node_modules/@dnd-kit/core
[ Wasp !] npm ERR! @dnd-kit/core@"^6.3.1" from the root project
[ Wasp !] npm ERR!
[ Wasp !] npm ERR! Could not resolve dependency:
[ Wasp !] npm ERR! peer react@"^19.0.0" from [email protected]
[ Wasp !] npm ERR! node_modules/react-dom
[ Wasp !] npm ERR! peer react-dom@">=16.8.0" from @dnd-kit/[email protected]
[ Wasp !] npm ERR! node_modules/@dnd-kit/core
[ Wasp !] npm ERR! @dnd-kit/core@"^6.3.1" from the root project
[ Wasp !] npm ERR!
[ Wasp !] npm ERR! Fix the upstream dependency conflict, or retry
[ Wasp !] npm ERR! this command with --force or --legacy-peer-deps
[ Wasp !] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
[ Wasp !] npm ERR!
[ Wasp !] npm ERR!
[ Wasp !] npm ERR! For a full report see:
[ Wasp !] npm ERR! /Users/wwwillems/.npm/_logs/2025-02-01T13_24_12_421Z-eresolve-report.txt
[ Wasp !]
[ Wasp !] npm ERR! A complete log of this run can be found in: /Users/wwwillems/.npm/_logs/2025-02-01T13_24_12_421Z-debug-0.log
Wasp TypeScript config (*.wasp.ts) | Wasp
This document assumes your app works with Wasp >= 0.15.
4 Replies
kapa.ai
kapa.ai2mo ago
Hi @WWWillems. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
WWWillems
WWWillemsOP2mo ago
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:
"resolutions": {
"@radix-ui/react-dismissable-layer": "^1.0.5",
"@radix-ui/react-focus-scope": "^1.0.4"
},
"overrides": {
"@dnd-kit/core": {
"react": "$react"
}
}
"resolutions": {
"@radix-ui/react-dismissable-layer": "^1.0.5",
"@radix-ui/react-focus-scope": "^1.0.4"
},
"overrides": {
"@dnd-kit/core": {
"react": "$react"
}
}
Any ideas/suggestions?
kapa.ai
kapa.ai2mo ago
---------------------- 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:
{
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}

{
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}

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:
wasp ts-setup --legacy-peer-deps

wasp ts-setup --legacy-peer-deps

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?
miho
miho4w ago
@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 ...

Did you find this page helpful?