W
Wasp2mo ago
jordi0lle

Upgraded to v0.15 and got this error on wasp start

app|feature/v0.15.0-upgrade⚡ ⇒ wasp start
🐝 --- Starting compilation and setup phase. Hold tight... ------------------------ 🐝 --- Compiling wasp project... -------------------------------------------------- [ Wasp ] Starting npm install [ Wasp !] npm ERR! code ERESOLVE [ Wasp !] npm ERR! ERESOLVE could not resolve [ Wasp !] npm ERR! [ Wasp !] npm ERR! While resolving: [email protected] [ Wasp !] npm ERR! Found: [email protected] [ Wasp !] npm ERR! node_modules/zod [ Wasp !] npm ERR! zod@"3.22.4" from the root project [ Wasp !] npm ERR! [ Wasp !] npm ERR! Could not resolve dependency: [ Wasp !] npm ERR! peerOptional zod@"^3.23.8" from [email protected] [ Wasp !] npm ERR! node_modules/openai [ Wasp !] npm ERR! openai@"^4.24.1" from the root project [ Wasp !] npm ERR! [ Wasp !] npm ERR! Conflicting peer dependency: [email protected] [ Wasp !] npm ERR! node_modules/zod [ Wasp !] npm ERR! peerOptional zod@"^3.23.8" from [email protected] [ Wasp !] npm ERR! node_modules/openai [ Wasp !] npm ERR! openai@"^4.24.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/jordiolleballeste/.npm/_logs/2024-10-27T16_20_15_921Z-eresolve-report.txt [ Wasp !] [ Wasp !] npm ERR! A complete log of this run can be found in: /Users/jordiolleballeste/.npm/_logs/2024-10-27T16_20_15_921Z-debug-0.log ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - npm install failed: Project setup failed with exit code 1. ❌ --- [Error] Compilation of wasp project failed: -------------------------------- 1 errors found
3 Replies
kapa.ai
kapa.ai2mo ago
Hi @jordi0lle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- This error appears to be related to a dependency conflict after upgrading to Wasp v0.15. The issue is specifically with the zod and openai packages. Let's break down the problem and suggest some solutions: 1. The error message indicates that there's a conflict between the version of zod you have installed (3.22.4) and the version that openai package is expecting (^3.23.8). 2. This type of issue is common when upgrading dependencies, as different packages may have conflicting requirements for shared dependencies. To resolve this, you can try the following steps: 1. First, try updating your zod dependency to version 3.23.8 or later in your project's package.json file:
"dependencies": {
"zod": "^3.23.8"
}

"dependencies": {
"zod": "^3.23.8"
}

2. If that doesn't work, you can try using one of the flags suggested in the error message:
wasp start --legacy-peer-deps

wasp start --legacy-peer-deps

or
wasp start --force

wasp start --force

These flags tell npm to ignore peer dependency conflicts and proceed with the installation. However, be cautious as this might lead to potential issues if the dependencies are truly incompatible. 3. If the above steps don't work, you might need to manually resolve the conflict by adjusting the versions of zod and openai in your package.json to find a combination that works together. 4. As a last resort, you could try removing your node_modules directory and package-lock.json file, then running wasp start again to do a fresh install of all dependencies. It's worth noting that Wasp is actively working on improving dependency management. There's an open issue Allow specifying npm dependency that Wasp already uses, with different version (https://github.com/wasp-lang/wasp/issues/59) which discusses allowing users to specify different versions of dependencies that Wasp uses internally. This might help prevent such conflicts in the future. If these steps don't resolve your issue, you might want to reach out to the Wasp community on their Discord channel (https://discord.com/channels/686873244791210014) for more specific help, as they've been responsive to similar issues in the past. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @jordi0lle, 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?
jordi0lle
jordi0lleOP2mo ago
No problem, I needed to update Zod in the dependencies, run wasp clean and wasp start. Solved now 😄
martinsos
martinsos2mo ago
Ok great!
Want results from more Discord servers?
Add your server