Query engine binary for current platform "linux-musl" could not be found.
See original GitHub issueHello Prisma team,
I have an issue when run app on docker and got runtime error like this.
My app env: typescript, nextjs.
> next start
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Using webpack 5. Reason: no next.config.js https://nextjs.org/docs/messages/webpack5
PrismaClientInitializationError2 [PrismaClientInitializationError]: Query engine binary for current platform "linux-musl" could not be found.
This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in "/query-engine-linux-musl")
Searched Locations:
/.prisma/client
..\src\generated\client
/
/
/
/tmp/prisma-engines
/
You already added the platform "linux-musl" to the "generator" block
in the "schema.prisma" file as described in https://pris.ly/d/client-generator,
but something went wrong. That's suboptimal.
Please create an issue at https://github.com/prisma/prisma/issues/new
at cb (/app/.next/server/pages/api/generate-code.js:892:539)
at async Object.GetPlan (/app/.next/server/pages/api/generate-code.js:167:16)
at async module.exports.YMAs.__webpack_exports__.default (/app/.next/server/pages/api/generate-code.js:464:20)
at async apiResolver (/app/node_modules/next/dist/next-server/server/api-utils.js:8:1)
at async Server.handleApiRequest (/app/node_modules/next/dist/next-server/server/next-server.js:66:462)
at async Object.fn (/app/node_modules/next/dist/next-server/server/next-server.js:58:580)
at async Router.execute (/app/node_modules/next/dist/next-server/server/router.js:25:67)
at async Server.run (/app/node_modules/next/dist/next-server/server/next-server.js:68:1042)
at async Server.handleRequest (/app/node_modules/next/dist/next-server/server/next-server.js:32:504) {
clientVersion: '2.24.1',
errorCode: undefined
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Dockerize NextJS Application with Prisma - Stack Overflow
I've found this solution with some workarounds: ... Query engine binary for current platform "linux-musl" could not be found." }.
Read more >Query engine (Concepts) - Prisma
Prisma's query engine manages the communication with the database when using Prisma Client. ... You can find an overview of all supported platforms...
Read more >Hi I m having difficulty in a project setup with Prisma Dock
Can anyone help me with this error? ... Query engine library for current platform "linux-musl" could not be found. app-api | You incorrectly ......
Read more >PyOxidizer - Release 0.23.0 Gregory Szorc
Serialize Python resource data into an efficient binary data structure ... like Could not find platform independent libraries <prefix> or ...
Read more >Query Engine Binary For Current Platform "Debian-Openssl ...
X" Could Not Be Found. Since I can't do this override I have to manually edit the default-lambda code using a custom ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You may have a check of your
schema.prisma
file:And you could add the
"linux-musl"
tobinaryTargets
field. This step fixes my building for docker image.For those that encounter that “Query engine binary for current platform “linux-musl” could not be found.” issue when packaging Prisma within Docker, i’ve added a solution workaround Gist here: https://gist.github.com/malteneuss/a7fafae22ea81e778654f72c16fe58d3