Query engine library for current platform "windows" could not be found
See original GitHub issueSuddenly, for no apparent reason:
Query engine library for current platform "windows" could not be found.
You incorrectly pinned it to windows
This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in "L:\src\foaf\node_modules\@prisma\client\runtime\query_engine-windows.dll.node")
Searched Locations:
L:\src\foaf\node_modules\.prisma\client
L:\src\foaf\node_modules\@prisma\client
L:\src\foaf\node_modules\@prisma\client
L:\src\foaf\node_modules\.prisma\client
L:\src\foaf\prisma
/tmp/prisma-engines
L:\src\foaf\node_modules\.prisma\client
You already added the platform "windows" 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 Object.getLibQueryEnginePath (node_modules/@prisma/client/runtime/index.js:36461:13)
at Object.loadEngine (node_modules/@prisma/client/runtime/index.js:36129:33)
at Object.instantiateLibrary (node_modules/@prisma/client/runtime/index.js:36095:5)
$ grep 'prisma' package.json
"prisma": "^3.6.0",
$ node -v
v16.10.0
$ npm -v
7.24.1
Shell is git-bash.
What can I tell you?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Prisma query engine not found on mac M1 - Stack Overflow
... PM web.1 | ^ 4:29:05 PM web.1 | PrismaClientInitializationError: Query engine library for current platform "darwin" could not be found.
Read more >@prisma/engines - npm
The postinstall hook of this package downloads all Prisma engines available for the current platform, namely the Query Engine, ...
Read more >Query engine (Concepts) - Prisma
From a technical perspective, Prisma Client consists of three major components: JavaScript client library; TypeScript type definitions; A query engine.
Read more >Database Engine events and errors - SQL Server
251, 16, No, Could not allocate ancillary table for query optimization. ... Use the current activity window in SQL Server Management Studio ...
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
Yeah, we are aware that this is kinda messy and your problem shows exactly how this then can go wrong even when you try to do the right thing. Thanks for the explanation!
@janpio Okay, the problem seemed to just be that I was using esbuild to produce the output folder and the includes/excludes were copying the linux version only. Our build is eventually for AWS Lambda, built from a Docker image has a different distro, so we specifically build the “rhel-openssl-1.0.x” version for AWS Lambda. But none of that is too relevant here, I just mention it because you asked about multiple targets:
This problem was on Windows and our
.esbuild
didn’t include the.node
engine file for Windows, because it was excluded in theserverless.yml
file. I added a*.node
wildcard instead of the rhel-specific path that was there and it’s fine:That last line ensures these are included. We originally had a problem with the size of prisma in the Lambda image so we started filtering down files that weren’t needed at runtime. I don’t think the others are still needed but the last line ensures we have the native engine, whatever that is.