prisma: Error: `Env var PRISMA_QUERY_ENGINE_LIBRARY is provided but provided path (...) can't be resolved.`

@aqrln Thanks for your support. That was the exact problem with environmentals! I think I’m almost there, but I have just one error left:

Error: Env var PRISMA_QUERY_ENGINE_LIBRARY is provided but provided path /home/pytonJajko/bin/prisma-engines/target/release/libquery_engine.so.node can't be resolved.

I tried to move binaries to project root folder, but the problem won’t vanished.

_Originally posted by @pyton-jajko in https://github.com/prisma/prisma/issues/3091#issuecomment-1346605482_

I still cannot reach why Prisma can’t resolve the file being present on the provided location. I think this is the last thing that separates me from running the app. If anyone have any suggestions about the issue, please share.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Hi @pyton-jajko, can you please run

ls -al $PRISMA_QUERY_ENGINE_LIBRARY

and

ls -al /home/pytonJajko/bin/prisma-engines/target/release

and paste the results of these commands here? It seems the libquery_engine.so.node file doesn’t exist in that directory.

If indeed it exists, can you please run

ldd /home/pytonJajko/bin/prisma-engines/target/release/libquery_engine.so.node

and post here the output?

@pyton-jajko Did you see @jkomyno’s message asking for more information? We need your help to debug your problem. Thanks.

I don’t have those binaries no more on the server - I need some time to build them again. I’ll let you know after I test it.

It looks like it was a problem in my environment, I didn’t understand what happened but it worked 😃

node -e "const envVar = 'PRISMA_QUERY_ENGINE_LIBRARY'; const envVarPath = path.resolve(process.cwd(), process.env[envVar]); console.log('\nenvVar:', envVar, '\nenvVarPath:', envVarPath, '\nfs.existsSync:', fs.existsSync(envVarPath))"
envVar: PRISMA_QUERY_ENGINE_LIBRARY 
envVarPath: /app/prisma/binaries/debian-openssl-1.1.x/libquery_engine.so.node.gz 
fs.existsSync: true

@Scrum You could try to debug using Node.js like this, here it’s a one liner:

PRISMA_QUERY_ENGINE_LIBRARY=./path/to/your/library-engine node -e "const envVar = 'PRISMA_QUERY_ENGINE_LIBRARY'; const envVarPath = path.resolve(process.cwd(), process.env[envVar]); console.log('\nenvVar:', envVar, '\nenvVarPath:', envVarPath, '\nfs.existsSync:', fs.existsSync(envVarPath))"

It would print, for example:

envVar: PRISMA_QUERY_ENGINE_LIBRARY 
envVarPath: /Users/nickname/some-path/path/to/your/library-engine
fs.existsSync: true

Where fs.existsSync: true means that Node.js can access it.