Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Prisma ORM 6 #67

Closed
jamols09 opened this issue Dec 6, 2024 · 24 comments · Fixed by #71
Closed

Incompatibility with Prisma ORM 6 #67

jamols09 opened this issue Dec 6, 2024 · 24 comments · Fixed by #71

Comments

@jamols09
Copy link

jamols09 commented Dec 6, 2024

As of the moment I cannot find a way to fix the issue. When you install this module you will get PrismaClient is not a constructor which will cause the developer tool not to show and causes some weird behavior with Nuxt.

image

@damisparks
Copy link

@jamols09 I am not a massive fan of the nuxt-prisma package. The issue you've opened needs more information.
In the future, I encourage you to imagine yourself as the maintainer before opening an issue.
Could you share a reproduction repo or example?

@ankur-arch
Copy link
Contributor

ankur-arch commented Dec 10, 2024

Thanks @jamols09 for creating the issue.

@damisparks is correct here, I need more information to reproduce this issue.

@tinegaCollins
Copy link

revert to these version till the issue is fixed "@prisma/client": "^5.22.0", "@prisma/nuxt": "^0.0.35",
it worked for me

@jharrell
Copy link
Member

@tinegaCollins were you also experiencing this issue? Could you provide a repo to help us debug this?

@Lateralus58
Copy link

experiencing the same issue on a fresh install of nuxt v3.14.1592

Steps to reproduce:

  • create clean nuxt project npx nuxi@latest init <my-app>
  • install @prisma/nuxt npm install @prisma/nuxt
  • add @prisma/nuxt to nuxt.config.ts as module
  • start dev server npx run dev
  • select prisma console defaults
  • open browser `https://localhost:3000' and view DevTools console

@RomainRoth
Copy link

Hi @jharrell , @ankur-arch

Here's a repository reproducing the issue : repo link

With prisma/client 5.22.0 & prisma/nuxt 0.0.35 no issues
With prisma/client 6.0.1 & prisma/nuxt 0.1.13 we get error messages within the browser console, also happens in storybook but w/e

I've migrated between the two versions so you can check the differences :
commits

In this large commit, you can see all the changes that been made to the generated prisma client between the two versions :
commit

@RomainRoth
Copy link

Just for reference, on this repo :

No issues directly with npx prisma generate, but fails at npm run build / nuxt build

PS E:\GitHub\prisma-nuxt-failure> npx prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma

✔ Installed the @prisma/client and prisma packages in your project

✔ Generated Prisma Client (v6.0.1) to .\node_modules\@prisma\client in 40ms

Start by importing your Prisma Client (See: https://pris.ly/d/importing-client)

Tip: Want to react to database changes in your app as they happen? Discover how with Pulse: https://pris.ly/tip-1-pulse

PS E:\GitHub\prisma-nuxt-failure> npm run build      

> build
> nuxt build

Nuxt 3.14.1592 with Nitro 2.10.4                                                                                                                                                                                      
✔ Prisma CLI is already installed.                                                                                                                                                                                   
✔ Prisma schema file exists.                                                                                                                                                                                         
✔ Database migrations folder exists.                                                                                                                                                                                 

Not migrating the database.
Generating Prisma client...                                                                                                                                                                                           

 ERROR  ✘ Failed to generate Prisma Client.   

@tinegaCollins
Copy link

tinegaCollins commented Dec 14, 2024

@jharrell this issue started when we updated nuxt packages, I'll try to reproduce it on a sandbox

@tinegaCollins
Copy link

@jharrell can I trust you with a private repo?

@jharrell
Copy link
Member

Yes, you can reach me at my Prisma email: Harrell (at) Prisma (dot) io

@guarenty
Copy link

guarenty commented Dec 16, 2024

same issue here

@JerryVDP
Copy link

Same

@tixlag
Copy link

tixlag commented Dec 16, 2024

Same issue. As a temporary solution, I downgraded @prisma/client from 6.0.1 to 5.22.0

It work for me:
"@prisma/client": "5.22.0",
"@prisma/nuxt": "0.1.3",

@gsxdsm
Copy link

gsxdsm commented Dec 21, 2024

Same issue. Sigh.

@jharrell
Copy link
Member

Hi @gsxdsm if you downgrade to Prisma Client 5.22.0 is the problem resolved?

@gsxdsm
Copy link

gsxdsm commented Dec 21, 2024

Will try, but I'd like to be on 6.1. Not sure why nuxt-prisma is stuck on an older version of Prisma. Doesn't make sense.

@pirhoo
Copy link

pirhoo commented Dec 21, 2024

Prisma 6 is only 3 weeks old, so I guess we need to be patient and give a break to opensource maintainers that already give a lot to the community.

@abrakazinga
Copy link

Had the same issue on a fresh Nuxt 3 install. Downgrading solved it. Thanks for all your efforts towards the project!

"@prisma/nuxt": "^0.1.3",
"@prisma/client": "^5.22.0",
"prisma": "^5.22.0",

@Qualterink
Copy link

sam issue, downgrade works fine

@jharrell jharrell changed the title Groundbreaking bug upon installing Incompatibility with Prisma ORM 6 Dec 21, 2024
@jharrell jharrell added the priority/P0 label Dec 21, 2024 — with Linear
ankur-arch added a commit that referenced this issue Dec 23, 2024
@ankur-arch
Copy link
Contributor

Thanks for the patience on this everyone 🙏 .

I can't reproduce the error with 0.0.0-experimental-b764aa7 and this PR should resolve this #69.

Just be sure to use the required node versions required for Prisma 6 too.

image

jharrell pushed a commit that referenced this issue Dec 23, 2024
@goldengecko
Copy link

Another data point: problem occurred with 6.1.0. I realised I had installed it using node 22.2.0, so I updated to node 22.12.0 and did a clean reinstall. Problem still occurred. Downgraded to Prisma 5.22.0 as described above and the problem disappeared.

@ankur-arch
Copy link
Contributor

@goldengecko 👋 , can you check if this is resolved in the pre-release version? 0.0.0-experimental-b764aa7.

The package wasn't published as there weren't significant changes 😕 from the PR above.

@goldengecko
Copy link

@ankur-arch Yes, I can confirm that it works with the following settings in node 22.12.0:

"@prisma/nuxt": "0.0.0-experimental-b764aa7",
"@prisma/client": "^6.1.0",
"prisma": "^6.1.0"

though I do get some errors about missing fonts in the Prisma Studio instance it boots up:

GET http://localhost:5555/inter-latin-400-normal.27ae72da.woff2 net::ERR_ABORTED 404 (Not Found)Understand this errorAI
index.css:1

GET http://localhost:5555/inter-all-400-normal.4c1f8a0d.woff 404 (Not Found)Understand this errorAI
index.js:1 Bootstrap Duration: 324.786865234375 ms
index.css:1

GET http://localhost:5555/inter-latin-600-normal.87d718a2.woff2 net::ERR_ABORTED 404 (Not Found)Understand this errorAI
index.css:1

GET http://localhost:5555/jetbrains-mono-latin-400-normal.80a5dc9e.woff2 net::ERR_ABORTED 404 (Not Found)Understand this errorAI
index.css:1

GET http://localhost:5555/inter-all-600-normal.d0a7c8a9.woff net::ERR_ABORTED 404 (Not Found)Understand this errorAI
index.css:1

GET http://localhost:5555/jetbrains-mono-all-400-normal.f86807b7.woff net::ERR_ABORTED 404 (Not Found)

Thanks for getting this working

Copy link

🎉 This issue has been resolved in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.