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.

`__res_init: symbol not found` when running Prisma

See original GitHub issue

What error exactly @cmwhited? Can you try with a prisma@dev and @prisma/client@dev (or version 4.0.0 which will be release tomorrow) please and post the full output you are getting? That would help us to make sure you ar egetting the same error indeed.

Updated to v4.0.0 and it still fails. I think it is actually an issue with pnpm. Testing now

update

after upgrading to v4, it is now throwing this more verbose error

#21 2.546 Error: Get Config: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
#21 2.546 Details: Unable to require(`/app/node_modules/.pnpm/prisma@4.0.0/node_modules/prisma/libquery_engine-linux-arm64-openssl-1.1.x.so.node`)
#21 2.546  Error relocating /app/node_modules/.pnpm/prisma@4.0.0/node_modules/prisma/libquery_engine-linux-arm64-openssl-1.1.x.so.node: __res_init: symbol not found

update 2

Switching from pnpm to yarn does not solve the issue, throws error

#18 1.179 api:gen:types: Prisma schema loaded from prisma/schema.prisma
#18 1.419 api:gen:types: Error: Get Config: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
#18 1.421 api:gen:types: Details: Unable to require(`/app/node_modules/prisma/libquery_engine-linux-arm64-openssl-1.1.x.so.node`)
#18 1.421 api:gen:types:  Error relocating /app/node_modules/prisma/libquery_engine-linux-arm64-openssl-1.1.x.so.node: __res_init: symbol not found
#18 1.421 api:gen:types: 
#18 1.421 api:gen:types: Prisma CLI Version : 4.0.0
#18 1.438 api:gen:types: error Command failed with exit code 1.

idk if it helps, but here are my versions

  • nodejs: v16.15.0
  • yarn: v1.22.17
  • pnpm: v7.3.0
  • mac osx: v12.4, m1 chip
  • docker: version 20.10.16, build aa7e414

_Originally posted by @cmwhited in https://github.com/prisma/prisma/issues/13717#issuecomment-1169255951_

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:5
  • Comments:26 (4 by maintainers)

github_iconTop GitHub Comments

16reactions
zackdotcomputercommented, Dec 13, 2022

Thanks @edlundin - that unblocked me. Adding RUN apk add --update --no-cache openssl1.1-compat to my dockerfile has fixed builds without needing to resort to the downgrade/crossgrade/emulation solutions on other threads.

9reactions
edlundincommented, Dec 13, 2022

I had the same issue with the docker image node:19-alpine, but using node:19-alpine3.16 fixed it.

Could it be an issue with alpine 3.17? Quoting https://alpinelinux.org/posts/Alpine-3.17.0-released.html, the default OpenSSL version, starting from 3.17, is 3.0. To use OpenSSL 1.1, installing the package openssl1.1-compat seems necessary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message reference - Prisma
Errors that can occur include: The provided credentials for the database are invalid; There is no database server running under the provided hostname...
Read more >
Prisma Client API (Reference)
Use the rejectOnNotFound parameter to configure findUnique and/or findFirst to throw an error if the record was not found. By default, both operations ......
Read more >
How to migrate from Sequelize to Prisma
Run the following command in your terminal to create a basic Prisma schema ... If you're not using PostgreSQL, you need to adjust...
Read more >
Prisma schema API (Reference)
Available in preview for PostgreSQL only in Prisma versions 4.5.0 and later. ... When running a Prisma CLI command that needs the database...
Read more >
Instructions for Authors | JAMA Internal Medicine
600 words; No more than 7 authors; ≤6 references ... In addition, a completed PRISMA checklist should be submitted for the items completed...
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