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

nuxt prisma 0.2 bug #74

Open
willyhsu0130 opened this issue Dec 29, 2024 · 5 comments
Open

nuxt prisma 0.2 bug #74

willyhsu0130 opened this issue Dec 29, 2024 · 5 comments
Assignees

Comments

@willyhsu0130
Copy link

When I use the nuxt prisma 0.2 module, there is an error in the code in the imported module that says:

"prismaClient is not a constructor"

Console refers to specifically this line:
return new PrismaClient();
that is in /node_modules/@prisma/nuxt/dist/runtime/server/utils/prisma.mjs

Problem is resolved if I revert back to the 0.1 version.

@husayt
Copy link

husayt commented Dec 30, 2024

i have seen that too. But somehow it is gone now. Try to clean node_modules and reinstall dependencies. See if that helps. Also, updating dependencies might help too.

@ankur-arch
Copy link
Contributor

Hi @willyhsu0130 👋,

Could you provide detailed reproduction steps to help me reproduce the issue?

Also, let us know if @husayt's suggestion resolves it for you!

@willyhsu0130
Copy link
Author

Hi @willyhsu0130 👋,

Could you provide detailed reproduction steps to help me reproduce the issue?

Also, let us know if @husayt's suggestion resolves it for you!

I'm just following this tutorial as a total beginner: https://www.youtube.com/watch?v=JTAo08f74GA&t=5454s.
The main packages I've installed are:
[email protected], [email protected], [email protected], nuxt-prisma module in that order.
I think the tutorial used prisma 0.1 so it worked for him.

In terms of trying to work with the 0.2 version, I've tried reinstalling all of them but it didn't work for me. I had to use 0.1 to make it work.

@ankur-arch
Copy link
Contributor

The main packages I've installed are:
[email protected], [email protected], [email protected], nuxt-prisma module in that order.
I think the tutorial used prisma 0.1 so it worked for him.

In terms of trying to work with the 0.2 version, I've tried reinstalling all of them but it didn't work for me. I had to use 0.1 to make it work.

Hi @willyhsu0130,

Could you kindly update your Prisma version to v6 and ensure the Node.js version supports Prisma 6?

Thank you so much! 😊

@willyhsu0130
Copy link
Author

The main packages I've installed are:
[email protected], [email protected], [email protected], nuxt-prisma module in that order.
I think the tutorial used prisma 0.1 so it worked for him.

In terms of trying to work with the 0.2 version, I've tried reinstalling all of them but it didn't work for me. I had to use 0.1 to make it work.

Hi @willyhsu0130,

Could you kindly update your Prisma version to v6 and ensure the Node.js version supports Prisma 6?

Thank you so much! 😊

I've created a copy of my file and updated both prisma and the prisma module to the latest version but the problem still persists.

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

4 participants