Samrith Shankar
09/12/2022, 6:12 PMOffBy0x01
09/12/2022, 6:14 PMSamrith Shankar
09/12/2022, 6:25 PMSamrith Shankar
09/12/2022, 6:25 PMSamrith Shankar
09/12/2022, 6:27 PMsls deploy
This is giving me a weird error:
"Runtime.UnhandledPromiseRejection: Error: Query engine library for current platform \"rhel-openssl-1.0.x\" could not be found.",
"You incorrectly pinned it to rhel-openssl-1.0.x",
"",
"This probably happens, because you built Prisma Client on a different platform.",
"(Prisma Client looked in \"/var/task/src/libquery_engine-rhel-openssl-1.0.x.so.node\")",
"",
"Searched Locations:",
"",
" /.prisma/client",
" /Users/<username>/<path-to-project>/node_modules/@prisma/client",
" /var/task",
" /var/task/src",
" /var/task/src",
" /tmp/prisma-engines",
" /var/task/src",
"",
"You already added the platforms \"darwin\", \"rhel-openssl-1.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 process.<anonymous> (file:///var/runtime/index.mjs:1131:17)",
" at process.emit (node:events:527:28)",
" at emit (node:internal/process/promises:140:20)",
" at processPromiseRejections (node:internal/process/promises:274:27)",
" at processTicksAndRejections (node:internal/process/task_queues:97:32)"
Though I have added this in my generator block:
binaryTargets = ["native", "rhel-openssl-1.0.x"]
And I also have this environment variable set:
PRISMA_QUERY_ENGINE_LIBRARY: /opt/prisma-binary
But it is not searching this path when running the server as you can see from the error logs.Samrith Shankar
09/12/2022, 6:28 PMls /opt/prisma-binary
I get:
libquery_engine-rhel-openssl-1.0.x.so.node
Samrith Shankar
09/12/2022, 8:34 PMPRISMA_QUERY_ENGINE_LIBRARY
path from:
/opt/prisma-binary
to the actual library file like so:
/opt/prisma-binary/libquery_engine-linux-arm64-openssl-1.0.x.so.node
Kay Khan
09/12/2022, 9:30 PMpackage: {
individually: true,
patterns: [
".prisma-layer/nodejs/node_modules/.prisma/client/schema.prisma",
".prisma-layer/nodejs/node_modules/.prisma/client/libquery_engine-${env:PRISMA_BINARY_TARGET}-*",
],
},
Kay Khan
09/12/2022, 9:34 PMVladi Stevanovic
Samrith Shankar
09/15/2022, 7:25 PMSamrith Shankar
09/15/2022, 7:26 PM