Prisma does not work with bun alpine docker image.
hiroaki2020 opened this issue · 2 comments
hiroaki2020 commented
Bug description
When I try to run prisma on oven/bun docker image(bun runtime official image), I got the following error.
PrismaClientInitializationError: Unable to require(`/home/bun/app/node_modules/.prisma/client/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`).
2024-05-07 18:57:17 The Prisma engines do not seem to be compatible with your system. Please refer to the documentation about Prisma's system requirements: https://pris.ly/d/system-requirements
2024-05-07 18:57:17
2024-05-07 18:57:17 Details: /usr/lib/libc.so: invalid ELF header
2024-05-07 18:57:17 at new e (/home/bun/app/node_modules/@prisma/client/runtime/library.js:22:1872)
2024-05-07 18:57:17 at /home/bun/app/node_modules/@prisma/client/runtime/library.js:111:10219
2024-05-07 18:57:17
2024-05-07 18:57:17 Bun v1.1.7 (Linux arm64)
How to reproduce
- run docker image oven/bun:1.1.7-alpine and enter it
- setup Nest.js + GraphQL + apollo
- run prisma migrate + generate. Those are successful.
- When I start container, I got the error above.
- Actualy when I ran prisma -v to get version I got the same error.
Expected behavior
work properly without the error
Prisma information
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
// email String @unique
name String?
}
Environment & setup
- host PC OS: macOS
- host PC chip: apple sillicon(M2)
- docker OS: alpine. It's on docker for Mac.
- Database: PostgreSQL
- Node.js version: I use bun instead.
Prisma Version
prisma + prisma client version is 5.13.0
hiroaki2020 commented
I tried debian oven/bun image and clarified prisma is working.
hiroaki2020 commented
Closing this issue because it seems this issue is caused by bun, not prisma.
source