I’m getting an error when running `prisma generate...
# orm-help
n
I’m getting an error when running
prisma generate
from inside my docker container. Keeps complaining that
libquery_engine-debian-openssl-1.1.x.so.node
is missing even though it is definitely there.
Copy code
$ yarn generate
yarn run v1.22.15
$ prisma generate
Prisma schema loaded from prisma/schema.prisma
Error: Unable to require(`/opt/node_app/node_modules/prisma/libquery_engine-debian-openssl-1.1.x.so.node`)
 libssl.so.1.1: cannot open shared object file: No such file or directory
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
$ ls -la
total 304
drwxr-xr-x   1 node node   4096 Nov  9 15:54 .
drwxr-xr-x   1 root root   4096 Nov  9 15:32 ..
drwxr-xr-x   2 node node   4096 Nov  9 15:54 cli
drwxr-xr-x 587 node node  20480 Nov  9 15:54 node_modules
-rw-r--r--   1 node node   2386 Nov  9 02:28 package.json
drwxr-xr-x   3 node node   4096 Nov  9 15:51 prisma
drwxr-xr-x   6 node node   4096 Nov  9 15:54 src
-rw-r--r--   1 node node    537 Nov  9 02:48 tsconfig.json
-rw-r--r--   1 node node 256177 Nov  9 02:28 yarn.lock
$ cd node_modules/prisma
$ ls -la
total 39896
drwxr-xr-x   7 node node     4096 Nov  9 15:54 .
drwxr-xr-x 587 node node    20480 Nov  9 15:54 ..
-rw-r--r--   1 node node    11357 Nov  9 15:52 LICENSE
-rw-r--r--   1 node node     1849 Nov  9 15:52 README.md
drwxr-xr-x   4 node node     4096 Nov  9 15:53 build
drwxr-xr-x   3 node node     4096 Nov  9 15:53 install
-rwxr-xr-x   1 node node 40784096 Nov  9 15:54 libquery_engine-debian-openssl-1.1.x.so.node
-rw-r--r--   1 node node     3905 Nov  9 15:52 package.json
drwxr-xr-x   3 node node     4096 Nov  9 15:53 preinstall
drwxr-xr-x   5 node node     4096 Nov  9 15:53 prisma-client
drwxr-xr-x   2 node node     4096 Nov  9 15:53 scripts
$ pwd
/opt/node_app/node_modules/prisma
$
r
@Noel Martin Llevares 👋 Could you share your
Dockerfile
and what version of Prisma are you on?
n
I figured out the cause. This works.
Copy code
FROM node:16.13.0
This fails.
Copy code
FROM node:16.13.0-slim
👍 1
r
If possible, you can also go for Alpine to make your builds smaller
n
Yeah. That’s one option.
Is there a reason Prisma fails on
node:16.13.0-slim
?
r
Most likely slim would be without some binaries/tools required by Prisma
Basically these, that Prisma needs to build. You could try building Prisma in node and using
slim
to run via multi-stage Docker builds
n
It also doesn’t work in a multi-stage build with the last target using
slim
. I’ll try to create a minimum repro repo and will put it up on Prisma Github issues.
💯 1