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.

Error: Get config: Unable to establish a connection to query-engine-node-api library

See original GitHub issue
$/prisma/starter$ npx prisma generate
Prisma schema loaded from prisma/schema.prisma
Error: Get config: Unable to establish a connection to query-engine-node-api library

Prisma CLI Version : 3.15.1-dev.1

How to Reproduce OS: 22.04 Ubuntu Node: 16.15.1 Follow these instructions. https://www.prisma.io/docs/getting-started/quickstart#1-download-the-starter-project Switch to latest possible release: 3.15.1-dev.1 as per today.

What have i tried so far Switching databases sqlite, postgres Switching node from 16 to 17. using 3.13 3.14 gives me this error

/snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libcrypto.so.3)

in ubuntu i could not figure out how to install GLIBC_2.33 tying with npm and yarn

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:32 (13 by maintainers)

github_iconTop GitHub Comments

5reactions
PiecePaperCodecommented, Jun 9, 2022

https://github.com/nodesource/distributions/blob/master/README.md

# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

Ok the snap version of node is not compatible with prisma. Its going to trap ubuntu users who install almost everything with snap.

2reactions
cmwhitedcommented, Jun 28, 2022

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
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Get config: Unable to establish a connection to query ...
In my case, my anaconda environment was on and so, I couldn't initiate the migration. Open a fresh terminal without any environments or ......
Read more >
Query engine (Concepts) - Prisma
Prisma's query engine manages the communication with the database when using Prisma Client. Learn how it works on this page.
Read more >
How to Fix "Unable to load Node-API Library" with Cypress on ...
Here's how to fix the "Unable to Load Node-API Library" error that can come up when trying to use Prisma in Cypress tasks...
Read more >
PostgreSQL connection errors in release_command - Fly.io
I'm getting a P1017 “Server has closed the connection” error. ... 2022-09-08T13:56:03.862Z prisma:getConfig Using CLI Query Engine (Node-API Library) at: ...
Read more >
please make sure your database server is running at ...
Below I run npx prisma introspect , but also npx prisma db push and a node script.js for each configuration to show that...
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