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.

Prisma 3.15.2 does not work on latest node:16-alpine3.17 (node:16-alpine3.16 works)

See original GitHub issue

Bug description

Suddenly our CI on github started to fail when running build inside docker image with node:16-alpine After few tryouts I have find out that node:16-alpine3.16 works but latest version node:16-alpine3.17 does not.

Prisma shows this error

Prisma schema loaded from prisma/schema.prisma
Error: Get config: Unable to establish a connection to query-engine-node-api library

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Reactions:10
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
craig-feldmancommented, Dec 15, 2022

We are using node 18 and prisma 4.6.1 and are also experiencing issues with the latest alpine:

Unable to load Node-API Library from /app/node_modules/.pnpm/@prisma+client@4.6.1_prisma@4.6.1/node_modules/.prisma/client/libquery_engine-linux-musl.so.node, Library may be corrupt

3reactions
jkomynocommented, Dec 16, 2022

Hey everyone, closing as a duplicate of https://github.com/prisma/prisma/issues/16553. Please follow the steps described in https://github.com/prisma/prisma/issues/16553#issuecomment-1353302617 for a working solution.

TL/DR, you have two choices:

  • Use a Node.js Docker image based on Alpine 3.16, like node:alpine3.16, node:lts-alpine3.16, node:18.12.1-alpine3.16 (encouraged)

  • Install OpenSSL 1.1.x via the openssl1.1-compat package, e.g., by adding

    RUN apk add --update --no-cache openssl1.1-compat
    

    to your Dockerfile before installing Prisma

Notes:

  • we recommend you to always pin Docker images to a specific version, to ensure reproducible builds
  • we’ve noticed some comments in similar issues suggesting to install libc / libc6-compat on Linux Alpine to fix the problem. Please DON’T do this, as it could cause other unexpected errors.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message reference
Prisma Client throws a PrismaClientUnknownRequestError exception if the query engine returns an error related to a request that does not have an error...
Read more >
Upgrade to Prisma 4
To upgrade, you will need to: upgrade to the new Prisma 4 packages following these instructions. manually fix the validation errors in your...
Read more >
System requirements
System requirements · Prisma supports and tests all Active LTS and Maintenance LTS Node.js releases. · TypeScript is only required for TypeScript users....
Read more >
Prisma Client API (Reference)
In this situation, one of the operations succesfully creates the new record but the other operations fail and return a unique key constraint...
Read more >
Prisma schema API (Reference)
The field is named relationMode in versions 4.5.0 and later, and was previously named referentialIntegrity . extensions, No, List of strings (PostgreSQL ...
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