Error generating prisma when build docker image

I use node 14, yarn v1.22.19 prisma v4.7.1
When I run yarn rw build api, I see this error

$ /app/node_modules/.bin/rw build api
(node:27) [FST_MODULE_DEP_FASTIFY-REPLY-FROM] FastifyWarning.fastify-reply-from: fastify-reply-from has been deprecated. Use @fastify/reply-from@7.0.0 instead.
(Use `node --trace-warnings ...` to show where the warning was created)
[08:06:06] Generating Prisma Client... [started]
[08:06:08] Generating Prisma Client... [failed]
[08:06:08] → Command failed with exit code 1: node "/app/node_modules/@redwoodjs/cli/node_modules/prisma/build/index.js" generate --schema="/app/api/db/schema.prisma"
Error: Unable to require(`/app/node_modules/@redwoodjs/cli/node_modules/prisma/libquery_engine-linux-musl.so.node`)
 Error loading shared library libssl.so.1.1: No such file or directory (needed by /app/node_modules/@redwoodjs/cli/node_modules/prisma/libquery_engine-linux-musl.so.node)
Prisma schema loaded from db/schema.prisma
Command failed with exit code 1: node "/app/node_modules/@redwoodjs/cli/node_modules/prisma/build/index.js" generate --schema="/app/api/db/schema.prisma"
Error: Unable to require(`/app/node_modules/@redwoodjs/cli/node_modules/prisma/libquery_engine-linux-musl.so.node`)
 Error loading shared library libssl.so.1.1: No such file or directory (needed by /app/node_modules/@redwoodjs/cli/node_modules/prisma/libquery_engine-linux-musl.so.node)
Prisma schema loaded from db/schema.prisma
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c yarn rw build api' returned a non-zero code: 1
ERROR: Service 'web' failed to build : Build failed

I was initially using FROM node:14-alpine and after changing to FROM node:16-bullseye-slim in Dockerfile it was working again

What version of Redwood are you running? I’m using 3.8.0 and getting an internal declaration error

 => ERROR [api_build 2/2] RUN yarn rw build api                                                                                                                                                                                                                                                                  5.9s
 => CANCELED [web_build 2/2] RUN yarn rw build web                                                                                                                                                                                                                                                               5.5s
------
 > [api_build 2/2] RUN yarn rw build api:
#29 5.758 rw build [side..]
#29 5.758
#29 5.758 Build for production
#29 5.758
#29 5.758 Positionals:
#29 5.758   side  Which side(s) to build
#29 5.758                         [array] [choices: "web", "api"] [default: ["web","api"]]
#29 5.758
#29 5.758 Options:
#29 5.758       --help                 Show help                                 [boolean]
#29 5.758       --version              Show version number                       [boolean]
#29 5.758       --cwd                  Working directory to use (where `redwood.toml` is
#29 5.758                              located)
#29 5.758       --stats                Use Webpack Bundle Analyzer (https://github.com/we
#29 5.758                              bpack-contrib/webpack-bundle-analyzer)
#29 5.758                                                       [boolean] [default: false]
#29 5.758   -v, --verbose              Print more               [boolean] [default: false]
#29 5.758       --prerender            Prerender after building web
#29 5.758                                                        [boolean] [default: true]
#29 5.758       --prisma, --db         Generate the Prisma client[boolean] [default: true]
#29 5.758       --performance, --perf  Measure build performance[boolean] [default: false]
#29 5.758
#29 5.758 Also see the Redwood CLI Reference
#29 5.758 (https://redwoodjs.com/docs/cli-commands#build)
#29 5.759
#29 5.761 Error: @redwoodjs/internal tried to access @graphql-tools/code-file-loader, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
#29 5.761
#29 5.761 Required package: @graphql-tools/code-file-loader
#29 5.761 Required by: @redwoodjs/internal@npm:3.8.0 (via /app/.yarn/cache/@redwoodjs-internal-npm-3.8.0-80bd5412af-f142f6e9a6.zip/node_modules/@redwoodjs/internal/dist/)
#29 5.761
#29 5.761 Require stack:
#29 5.761 - /app/.yarn/cache/@redwoodjs-internal-npm-3.8.0-80bd5412af-f142f6e9a6.zip/node_modules/@redwoodjs/internal/dist/validateSchema.js
#29 5.761 - /app/.yarn/cache/@redwoodjs-cli-npm-3.8.0-6a21951b42-e11ed0412f.zip/node_modules/@redwoodjs/cli/dist/commands/buildHandler.js
#29 5.761 - /app/.yarn/cache/@redwoodjs-cli-npm-3.8.0-6a21951b42-e11ed0412f.zip/node_modules/@redwoodjs/cli/dist/commands/build.js
#29 5.761 - /app/.yarn/cache/@redwoodjs-cli-npm-3.8.0-6a21951b42-e11ed0412f.zip/node_modules/@redwoodjs/cli/dist/index.js
#29 5.761 - /app/.yarn/cache/@redwoodjs-cli-npm-3.8.0-6a21951b42-e11ed0412f.zip/node_modules/@redwoodjs/cli/package.json
#29 5.761     at Function.require$$0.Module._resolveFilename (/app/.pnp.cjs:51842:13)
#29 5.761     at Function.require$$0.Module._load (/app/.pnp.cjs:51696:42)
#29 5.761     at Module.require (node:internal/modules/cjs/loader:1005:19)
#29 5.761     at require (node:internal/modules/cjs/helpers:102:18)
#29 5.761     at Object.<anonymous> (/app/.yarn/cache/@redwoodjs-internal-npm-3.8.0-80bd5412af-f142f6e9a6.zip/node_modules/@redwoodjs/internal/dist/validateSchema.js:17:23)
#29 5.761     at Module._compile (node:internal/modules/cjs/loader:1105:14)
#29 5.761     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
#29 5.761     at Object.require$$0.Module._extensions..js (/app/.pnp.cjs:51886:33)
#29 5.761     at Module.load (node:internal/modules/cjs/loader:981:32)
#29 5.761     at Function.require$$0.Module._load (/app/.pnp.cjs:51726:14)
------
executor failed running [/bin/sh -c yarn rw build api]: exit code: 1

I’m using redwoodjs v3.8.0 @ajoslin103

I was using yarn 3.2.1 – yarn 3.3.1 fixed my problem :+1:t3: