question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't find prisma engine

See original GitHub issue

I am trying to run prisma using SST (v2 preview https://docs.sst.dev/live-lambda-development)

There is a openssl-3.0.x.so.node in /home/cyber/dev/tombo/node_modules/.pnpm/@prisma+client@4.2.1_prisma@4.2.1/node_modules/@prisma/.client in .client but not in client (see screenshot)

image

(Prisma Client looked in "/home/cyber/dev/tombo/.sst/artifacts/c8166de0c7150c4e49f1170198e61b2079a9dd1fc0/libquery_engine-debian-openssl-3.0.x.so.node")

Searched Locations:

  /home/cyber/dev/tombo/.prisma/client
  /home/cyber/dev/tombo/node_modules/.pnpm/@prisma+client@4.2.1_prisma@4.2.1/node_modules/@prisma/client
  /home/cyber/dev/tombo/.sst/artifacts
  /home/cyber/dev/tombo/.sst/artifacts/c8166de0c7150c4e49f1170198e61b2079a9dd1fc0
  /home/cyber/dev/tombo/.sst/artifacts/c8166de0c7150c4e49f1170198e61b2079a9dd1fc0
  /tmp/prisma-engines
  /home/cyber/dev/tombo/.sst/artifacts/c8166de0c7150c4e49f1170198e61b2079a9dd1fc0

You already added the platform "debian-openssl-3.0.x" 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
         Error: Query engine library for current platform "debian-openssl-3.0.x" could not be found.
         You incorrectly pinned it to debian-openssl-3.0.x
         
         This probably happens, because you built Prisma Client on a different platform.
         (Prisma Client looked in "/home/cyber/dev/tombo/.sst/artifacts/c8166de0c7150c4e49f1170198e61b2079a9dd1fc0/libquery_engine-debian-openssl-3.0.x.so.node")
         
         Searched Locations:
         
           /home/cyber/dev/tombo/.prisma/client
           /home/cyber/dev/tombo/node_modules/.pnpm/@prisma+client@4.2.1_prisma@4.2.1/node_modules/@prisma/client
           /home/cyber/dev/tombo/.sst/artifacts
           /home/cyber/dev/tombo/.sst/artifacts/c8166de0c7150c4e49f1170198e61b2079a9dd1fc0
           /home/cyber/dev/tombo/.sst/artifacts/c8166de0c7150c4e49f1170198e61b2079a9dd1fc0
           /tmp/prisma-engines
           /home/cyber/dev/tombo/.sst/artifacts/c8166de0c7150c4e49f1170198e61b2079a9dd1fc0
         
         You already added the platform "debian-openssl-3.0.x" 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.handleRequestError (/home/cyber/dev/tombo/node_modules/.pnpm/@prisma+client@4.2.1_prisma@4.2.1/node_modules/@prisma/client/runtime/index.js:28844:13)
             at <anonymous> (/home/cyber/dev/tombo/node_modules/.pnpm/@prisma+client@4.2.1_prisma@4.2.1/node_modules/@prisma/client/runtime/index.js:29231:25)
             at PrismaClient2._executeRequest (/home/cyber/dev/tombo/node_modules/.pnpm/@prisma+client@4.2.1_prisma@4.2.1/node_modules/@prisma/client/runtime/index.js:29782:22)
             at PrismaClient2._request (/home/cyber/dev/tombo/node_modules/.pnpm/@prisma+client@4.2.1_prisma@4.2.1/node_modules/@prisma/client/runtime/index.js:29753:16)
             at Module.handler (/home/cyber/dev/tombo/packages/service/src/cognito/triggers/preTokenGeneration.ts:14:24)
             at async file:///home/cyber/dev/tombo/node_modules/.pnpm/sst@0.0.0-20221215185326_o5y4mdthrs7ed27ibxm4wyqwiq/node_modules/sst/support/nodejs-runtime/index.mjs:14644:16

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
neil-hughescommented, Dec 20, 2022

We hit the same problem this morning deploying through CircleCI. Busting the cache didn’t work and we weren’t able to figure out why “native” binaryTarget wasn’t generating the correct engines. In the end we went for a brute force approach and are now generating a load of unnecessary targets:

binaryTargets = ["native", "debian-openssl-1.1.x", "debian-openssl-3.0.x"]

This works in all environments and got our production site back up but it doesn’t feel great.

I’m not sure how to investigate further why the runtime engine wasn’t matching whichever was generated at build time. Happy to look into the underlying issue more and report back if anyone can point me in a useful direction.

1reaction
jclaessens97commented, Dec 20, 2022

I tested it with 4.6 and 4.7.1 but I get the same result.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prisma engines
Learn about Prisma internals and how it works "under the hood". Prisma tools are based on an engine-layer which manages the communication with...
Read more >
@prisma/engines - npm
The postinstall hook of this package downloads all Prisma engines available for the current platform, namely the Query Engine, Migration Engine, ...
Read more >
Prisma query engine not found on mac M1 - Stack Overflow
I can't seem to figure out how to generate the right query engine binary with darwin and not darwin-arm64 , or have the...
Read more >
@prisma/engines | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Prisma Client Python
Prisma Client Python connects to the database and executes queries using Prisma's rust-based Query Engine, of which the source code can be found...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found