W
Wasp-lang2mo ago
2euxs

[ERROR] Cannot start service: Host version "0.21.5" does not match binary version "0.18.20"

Getting this error while trying to load wasp with "wasp start" command. How could I fix it ? If you need any other information don't mind asking.
4 Replies
kapa.ai
kapa.ai2mo ago
Hi @2euxs. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It appears you're encountering a version mismatch error between your installed Wasp version and the version specified in your project. This is a common issue when working with different Wasp projects or after updating Wasp. Here's how you can address this: 1. Check your current Wasp version: Run wasp version in your terminal to see what version you have installed. 2. Update Wasp: The error suggests you have version 0.18.20 installed, but your project is expecting 0.21.5. You should update Wasp to the latest version. You can do this by running the Wasp installer script:
curl -sSL <https://get.wasp-lang.dev/installer.sh> | sh

curl -sSL <https://get.wasp-lang.dev/installer.sh> | sh

This will install the latest version of Wasp Discord support thread (https://discord.com/channels/686873244791210014/1223304925627285574). 3. If updating doesn't work or you need a specific version: You can install a specific version of Wasp using the installer script with a version flag. For example, to install version 0.21.5:
curl -sSL <https://get.wasp-lang.dev/installer.sh> | sh -s -- -v 0.21.5

curl -sSL <https://get.wasp-lang.dev/installer.sh> | sh -s -- -v 0.21.5

This functionality was discussed as a potential feature in Github Issue #578 (https://github.com/wasp-lang/wasp/issues/578), but I'm not certain if it has been implemented yet. 4. After updating or installing the correct version, try running wasp start again. If you continue to have issues or need more information, please let me know. It would be helpful to know which version of Wasp your project is expecting (check the app.wasp file for a wasp or app.wasp.version field if it exists) and what version you currently have installed. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @2euxs, 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?
2euxs
2euxsOP2mo ago
I am now getting this error @kapa.ai How can I fix it ? Server!] PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime "darwin-arm64". [ Server!] [ Server!] This happened because Prisma Client was generated for "darwin", but the actual deployment required "darwin-arm64". [ Server!] Add "darwin-arm64" to binaryTargets in the "schema.prisma" file and run prisma generate after saving it: [ Server!] [ Server!] generator client { [ Server!] provider = "prisma-client-js" [ Server!] binaryTargets = ["native", "darwin-arm64"] [ Server!] } [ Server!] [ Server!] The following locations have been searched: [ Server!] /Users/nassim/Frak/tik-frak_wasp/app/node_modules/.prisma/client [ Server!] /Users/nassim/Frak/tik-frak_wasp/app/node_modules/@prisma/client [ Server!] /tmp/prisma-engines [ Server!] /Users/nassim/Frak/tik-frak_wasp/app/.wasp/out/db [ Server!] at Xs (/Users/nassim/Frak/tik-frak_wasp/app/node_modules/@prisma/client/runtime/library.js:60:793) [ Server!] at async en.loadLibrary (/Users/nassim/Frak/tik-frak_wasp/app/node_modules/@prisma/client/runtime/library.js:106:598) [ Server!] at async ir.loadEngine (/Users/nassim/Frak/tik-frak_wasp/app/node_modules/@prisma/client/runtime/library.js:108:538) [ Server!] at async ir.instantiateLibrary (/Users/nassim/Frak/tik-frak_wasp/app/node_modules/@prisma/client/runtime/library.js:107:1861) { [ Server!] clientVersion: '4.16.2', [ Server!] errorCode: undefined [ Server!] } [ Server!] [ Server!] Node.js v23.1.0
kapa.ai
kapa.ai2mo ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- This error is related to Prisma Client not being able to find the correct Query Engine for your system architecture (darwin-arm64, which is macOS on Apple Silicon). Here's how you can fix it: 1. Open your schema.prisma file, which should be located in the db directory of your Wasp project. 2. Modify the generator block in your schema.prisma file to include the darwin-arm64 binary target. It should look like this:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "darwin-arm64"]
}

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "darwin-arm64"]
}

3. After making this change, you need to regenerate the Prisma Client. Run the following command in your project directory:
wasp db migrate-dev

wasp db migrate-dev

This command will apply any pending migrations and regenerate the Prisma Client with the correct binary targets Github Issue #228 (https://github.com/wasp-lang/wasp/issues/228). 4. If the above doesn't work, you can try running prisma generate directly:
npx prisma generate

npx prisma generate

5. After regenerating the Prisma Client, try running wasp start again. If you continue to encounter issues, it might be related to the version of Node.js you're using. The error message shows you're using Node.js v23.1.0, which is quite recent. Wasp and Prisma might not be fully compatible with this version yet. You could try using an LTS (Long Term Support) version of Node.js, such as v18 or v20, which are more stable and widely supported. If the problem persists, please let me know, and we can explore other potential solutions. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @2euxs, 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
miho2mo ago
Are you on Windows and using WSL?
Want results from more Discord servers?
Add your server