Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prisma-fmt-debian-openssl-1.1.x was not included into executable #18

Closed
oscartbeaumont opened this issue Mar 15, 2022 · 3 comments · Fixed by #19
Closed

prisma-fmt-debian-openssl-1.1.x was not included into executable #18

oscartbeaumont opened this issue Mar 15, 2022 · 3 comments · Fixed by #19

Comments

@oscartbeaumont
Copy link
Collaborator

When running prisma-client-rust I keep receiving the following error which prevents me from using this project.

> Downloading Prisma engines for Node-API for debian-openssl-1.1.x [========            ] 39%Error: File or directory '/**/node_modules/prisma/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x' was not included into executable at compilation stage. Please recompile adding it as asset or script.

I am running on Linux 5.13.0-35-generic #40~20.04.1-Ubuntu.

This error looks the same as steebchen/prisma-client-go#449 but they seem to be struggling to debug it due to it being an intermittent issue. I have managed to make a Dockerfile here which reproduces this issue using prisma-client-rust but I am unable to get the same error when using prisma-client-go in a similar setup.

@janpio
Copy link
Contributor

janpio commented Mar 16, 2022

Does the Client set either PRISMA_QUERY_ENGINE_LIBRARY or PRISMA_MIGRATION_ENGINE_BINARY pointing to a file that contains the appropriate file prisma-fmt-debian-openssl-1.1.x? That should skip the download logic in the CLI.

@oscartbeaumont
Copy link
Collaborator Author

If I use the following commands everything works. Thanks @janpio.

# Permission issue workaround -> Discussed below
sudo mkdir /snapshot
sudo chown -R $(id -u):$(id -g) /snapshot

# First CLI execution downloads the correct binary and throws the error. Send execution works correctly.
prisma-client-rust generate
export PRISMA_QUERY_ENGINE_LIBRARY=/snapshot/node_modules/prisma/node_modules/@prisma/engines/
prisma-client-rust generate

To fix this would it make sense for the prisma-client-rust CLI to determine if this file is needed, download it and set the environment variables or should a different version of the Prisma CLI be downloaded which includes the expected file.

It's also worth noting that the Prisma CLI is downloading the binaries to the /snapshot directory on my system. Writing files here is both undesired and also introduces permission issues for most Linux setups. Although this won't be an issue if prisma-client-rust is in charge of downloading the file.

@janpio
Copy link
Contributor

janpio commented Mar 16, 2022

That is generally a thing the Rust Client (which is modelled after how the Go Client works) should be doing. Seems for some reason it does not do that for you, leading to the suboptimal Prisma CLI included code for downloading to be triggered.

We also want to fix that /snapshot bug internally in the packaged CLI, but that is not a priority right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants