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

Problems with generating prisma client using bun #14962

Open
Elijjahh opened this issue Nov 2, 2024 · 1 comment
Open

Problems with generating prisma client using bun #14962

Elijjahh opened this issue Nov 2, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Elijjahh
Copy link

Elijjahh commented Nov 2, 2024

What version of Bun is running?

1.1.33

What platform is your computer?

Macos 15.1

What is the expected behavior?

I should get generated client.

What do you see instead?

When I install @prisma/nuxt and start at dev mode everything works until "Generating Prisma client...". At this moment it just freezes and nothing happens

Steps to reproduce:

# creating nuxt project
bunx nuxi@latest init <my-app>

bun install @prisma/nuxt

Add "@prisma/nuxt" to nuxt modules and run:

bun run dev

Additional information

There are some experiments that I've done. I've noticed that it works when there is no bun.lockb. So I tried installing packages and start dev mode with deleted bun.lockb and it worked.

Also if I add bunfig.toml:

[install.lockfile]

# whether to save the lockfile to disk
save = false

then it also works.

Also after successful first time (using no bun.lockdb or bunfig.toml) it works anyway (with/without bun.lockdb). I am new to bun and prisma so I don't know the exact reason. I guess that "@prisma/nuxt" installs "@prisma/client" at first time and that breaks everything and at second time it is already installed so everything works. And it's very strange that bun.lockdb somehow affects runtime

Screenshots

Generation freezes. You can see that it started at 22:03 and I made a screenshot at 22:06:

изображение

Generation works good. Removed @prisma/nuxt from modules so it doesn't run at nuxt prepare. Then removed bun.lockdb and ran bun dev:

Снимок экрана 2024-11-01 в 22 12 12 Снимок экрана 2024-11-01 в 22 13 33

Generation works. Added bunfig.toml

Снимок экрана 2024-11-01 в 22 17 11
@nektro nektro added the bug Something isn't working label Nov 4, 2024
@realspinelle
Copy link

in case your searching for a fix downgrade ur bun to 1.1.29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants