Coder Social home page Coder Social logo

Comments (3)

janpio avatar janpio commented on July 29, 2024 2

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.

from prisma-client-rust.

janpio avatar janpio commented on July 29, 2024

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.

from prisma-client-rust.

oscartbeaumont avatar oscartbeaumont commented on July 29, 2024

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.

from prisma-client-rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.