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

Groundbreaking bug upon installing #67

Open
jamols09 opened this issue Dec 6, 2024 · 13 comments
Open

Groundbreaking bug upon installing #67

jamols09 opened this issue Dec 6, 2024 · 13 comments

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",

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

No branches or pull requests

10 participants