W
Wasp-lang7mo ago
Kbk

Prisma update Update available 4.16.2 -> 5.12.1

Can I update prisma in wasp project? What impact it would have? │ Update available 4.16.2 -> 5.12.1 │ [ Db !] │ │ [ Db !] │ This is a major update - please follow the guide at │ [ Db !] │ https://pris.ly/d/major-version-upgrade │ [ Db !] │ │ [ Db !] │ Run the following to update │ [ Db !] │ npm i --save-dev prisma@latest │ [ Db !] │ npm i @prisma/client@latest
Upgrading versions (Guides) | Prisma Documentation
Upgrading your project to the latest version of Prisma ORM.
5 Replies
kapa.ai
kapa.ai7mo ago
Hi @Kbk. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, you can update Prisma in a Wasp project. However, it's important to note that Wasp has certain dependencies on specific versions of Prisma. For instance, in one of the issues, it was mentioned that Wasp was fixed to Prisma version 2.12.1 and updating it to a newer version would require setting up a 2-way communication with Prisma CLI for users to use Prisma directly from Wasp (source (https://github.com/wasp-lang/wasp/issues/194)). In another discussion, it was mentioned that updating Prisma might lead to some issues as Wasp assumes it works with a certain version of Prisma, and using a different version might cause some features to break (source (https://discord.com/channels/686873244791210014/1097604882011267102)). Therefore, while you can update Prisma, it's recommended to follow the upgrade guide provided by Prisma to ensure a smooth transition. Also, be prepared for potential issues and be ready to troubleshoot them. Before updating, you might want to consider the impact on your project and whether the new features in the updated version are necessary for your project. If you decide to proceed with the update, you can use the commands provided:
npm i --save-dev prisma@latest
npm i @prisma/client@latest
npm i --save-dev prisma@latest
npm i @prisma/client@latest
Remember to test your application thoroughly after the update to ensure everything works as expected. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Kbk, 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?
Kbk
Kbk7mo ago
Thanks bot 😄 Wasp ] auth/providers/types.ts(11,37): error TS2694: Namespace '"/mnt/c/Users/patku/projects/opensaas/CryptoTX/app/.wasp/out/sdk/wasp/node_modules/.prisma/client/index".Prisma' has no exported member 'UserCreateInput'. [ Wasp ] auth/utils.ts(131,17): error TS2694: Namespace '"/mnt/c/Users/patku/projects/opensaas/CryptoTX/app/.wasp/out/sdk/wasp/node_modules/.prisma/client/index".Prisma' has no exported member 'AuthWhereInput'. [ Wasp ] auth/utils.ts(192,27): error TS2339: Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'. [ Wasp ] auth/utils.ts(192,62): error TS2339: Property 'code' does not exist on type 'unknown'. [ Wasp ] auth/utils.ts(198,27): error TS2339: Property 'PrismaClientValidationError' does not exist on type 'typeof Prisma'. [ Wasp ] auth/utils.ts(209,27): error TS2339: Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'. [ Wasp ] auth/utils.ts(209,62): error TS2339: Property 'code' does not exist on type 'unknown'. [ Wasp ] auth/utils.ts(220,27): error TS2339: Property 'PrismaClientKnownRequestError' does not exist on type 'typeof Prisma'. now i got this isue how to resolve it any ideas?
miho
miho7mo ago
At this particular topic, the bot is not correct 🙂 You can't update Prisma on your own since a lot of the Wasp internals is built with a specific Wasp version in mind. Therefore, you'll have to stay at Prisma v4 for now 😄 we have a plan of upgrading to v5 soon. Don't worry about the message that says "Upgrade available" everything works as expected with the Prisma v4 as well
Kbk
Kbk7mo ago
It works, just changed prisma version to 4.0.0. Thanks 🙂
martinsos
martinsos7mo ago
I sent task to remove this warning back to triage so we can prioritize it in the next srpint
Want results from more Discord servers?
Add your server