Skip to content

Prisma 7 still attempts to download rust binaries on NixOS #29150

Description

@mcpar-land

Bug description

Attempting to use the Prisma CLI at version 7.3.0 exits with an error, saying that precompiled engine files are not available for NixOS. My understanding of Prisma 7 (which may be incorrect) is that it is now written without Rust, meaning binaries are not required.

Severity

⚠️ Major: Breaks core functionality (e.g., migrations fail)

Reproduction

npx prisma@7.3.0 version
Need to install the following packages:
prisma@7.3.0
Ok to proceed? (y) y

prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
Please manually install OpenSSL and try installing Prisma again.
Warning Precompiled engine files are not available for nixos, please provide the paths via environment variables, see https://pris.ly/d/custom-engines
> Downloading Prisma engines for linux-nixos [                    ] 0%Error: Failed to fetch sha256 checksum at https://binaries.prisma.sh/all_commits/9d6ad21cbbceab97458517b147a6a09ff43aa735/linux-nixos/schema-engine.sha256 - 404 Not Found

If you need to ignore this error (e.g. in an offline environment), set the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable to a truthy value.
Example: PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1

Expected vs. Actual Behavior

Did not expect a precompiled library to be necessary.

Frequency

Consistently reproducible

Does this occur in development or production?

Only in development (e.g., CLI tools, migrations, Prisma Studio)

Is this a regression?

No.

Workaround

Not that I know of - On Prisma 6 we set various environment variables to link to the compiled engine binaries - but checking the docs on environment variables, those are all now not applicable to version 7.

https://www.prisma.io/docs/orm/reference/environment-variables-reference#engine-environment-variables

Prisma Schema & Queries

// Add relevant schema.prisma snippet
// Add relevant Prisma Client query

Prisma Config

// Add your `prisma.config.ts`

Logs & Debug Info

DEBUG="*" npx prisma@7.3.0 version
prisma:cli:bin Failed to initialize the command state: Error: ENOENT: no such file or directory, open '/home/mcp/.config/prisma-nodejs/commands.json' +526ms
prisma:config:loadConfigFromFile Config file loaded in 46.13ms +296ms
prisma:config:loadConfigFromFile No config file found in the current working directory /home/mcp +0ms
prisma:getSchema Checking existence of /home/mcp/schema.prisma +49ms
prisma:getSchema Reading schema from single file /home/mcp/schema.prisma +0ms
prisma:getSchema Checking existence of /home/mcp/schema.prisma +0ms
prisma:getSchema Reading schema from single file /home/mcp/schema.prisma +0ms
prisma:engines binaries to download schema-engine +573ms
prisma:getSchema Checking existence of /home/mcp/prisma/schema.prisma +1ms
prisma:getSchema Reading schema from single file /home/mcp/prisma/schema.prisma +1ms
prisma:getSchema Checking existence of /home/mcp/prisma/schema.prisma +0ms
prisma:getSchema Reading schema from single file /home/mcp/prisma/schema.prisma +0ms
prisma:cli:checkpoint Error from runCheckpointClientCheck() +1ms
prisma:cli:checkpoint {} +0ms
prisma:cli:checkpoint Error from tryToReadDataFromSchema() while processing the schema. This is not a fatal error. It will continue without the processed data. +0ms
prisma:cli:checkpoint {} +0ms
prisma:get-platform Found distro info:
{
  "targetDistro": "nixos",
  "originalDistro": "nixos",
  "familyDistro": "nixos"
} +1ms
prisma:get-platform Don't know any platform-specific paths for "nixos" on x64 (x86_64) +0ms
prisma:get-platform Falling back to "ldconfig" and other generic paths +0ms
prisma:get-platform Couldn't find any version of libssl or OpenSSL in the system +16ms
prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
Please manually install OpenSSL and try installing Prisma again.
Warning Precompiled engine files are not available for nixos, please provide the paths via environment variables, see https://pris.ly/d/custom-engines
prisma:fetch-engine:download file /home/mcp/.npm/_npx/2cef9478d0fb0c6f/node_modules/@prisma/engines/schema-engine-linux-nixos does not exist and must be downloaded +1ms
prisma:fetch-engine:download https://binaries.prisma.sh/all_commits/9d6ad21cbbceab97458517b147a6a09ff43aa735/linux-nixos/schema-engine.gz will be downloaded to /home/mcp/.npm/_npx/2cef9478d0fb0c6f/node_modules/@prisma/engines/schema-engine-linux-nixos +0ms
prisma:fetch-engine:download Downloading https://binaries.prisma.sh/all_commits/9d6ad21cbbceab97458517b147a6a09ff43aa735/linux-nixos/schema-engine.gz to /home/mcp/.npm/_npx/2cef9478d0fb0c6f/node_modules/@prisma/engines/schema-engine-linux-nixos ... +1ms
> Downloading Prisma engines for linux-nixos [                    ] 0%prisma:fetch-engine:downloadZip An error occurred while downloading the checksums files {
  "attemptNumber": 1,
  "retriesLeft": 2
} +228ms
prisma:fetch-engine:downloadZip An error occurred while downloading the checksums files {
  "attemptNumber": 2,
  "retriesLeft": 1
} +1133ms
prisma:fetch-engine:downloadZip An error occurred while downloading the checksums files {
  "attemptNumber": 3,
  "retriesLeft": 0
} +2121ms
Error: Error: Failed to fetch sha256 checksum at https://binaries.prisma.sh/all_commits/9d6ad21cbbceab97458517b147a6a09ff43aa735/linux-nixos/schema-engine.gz.sha256 - 404 Not Found

If you need to ignore this error (e.g. in an offline environment), set the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable to a truthy value.
Example: PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1
    at R_e (/home/mcp/.npm/_npx/2cef9478d0fb0c6f/node_modules/prisma/build/index.js:179:53)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Promise.all (index 0)
    at async retries (/home/mcp/.npm/_npx/2cef9478d0fb0c6f/node_modules/prisma/build/index.js:180:156)
    at async iu._fn (/home/mcp/.npm/_npx/2cef9478d0fb0c6f/node_modules/prisma/build/index.js:33:6841)

Environment & Setup

  • OS: NixOS
  • Database: PostgreSQL
  • Node.js version: v22.21.1

Prisma Version

npx prisma@7.3.0 -v
prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
Please manually install OpenSSL and try installing Prisma again.
Warning Precompiled engine files are not available for nixos, please provide the paths via environment variables, see https://pris.ly/d/custom-engines
> Downloading Prisma engines for linux-nixos [                    ] 0%Error: Failed to fetch sha256 checksum at https://binaries.prisma.sh/all_commits/9d6ad21cbbceab97458517b147a6a09ff43aa735/linux-nixos/schema-engine.gz.sha256 - 404 Not Found

If you need to ignore this error (e.g. in an offline environment), set the PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING environment variable to a truthy value.
Example: PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1

Activity

  1. added
    bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.
    on Feb 9, 2026
  2. BatuhanTopcu commented on Feb 16, 2026

    @BatuhanTopcu

    In Gitlab CI we have an environment that not allows connection to cdn of binaries, Prisma advertises being Rust-free everywhere but it actually tries to install them in client generation, why this issue doesn't addressed anywhere?

  3. francois-travais commented on Feb 18, 2026

    @francois-travais

    @mcpar-land I managed to go around it by just installing prisma and prisma-engines packages. Even if they are v6 engines it's enough for the CLI to continue.

    The culprit is this line which is attempting to download the engine no matter what. So even with an old binary it's enough for the CLI to go on.

  4. niklaskorz commented on Feb 19, 2026

    @niklaskorz

    For the environment variable, the download function only checks if the file exists, so you should be able to set PRISMA_SCHEMA_ENGINE_BINARY to an empty text file without needing to pull in prisma-engines.

  5. karthicedric7-cloud commented on Mar 20, 2026

    @karthicedric7-cloud

    Missing env variables in Prisma setups are so easy to miss. safelaunch validates your entire environment before you push catches missing and misconfigured variables so you're not debugging them mid-deploy.

    npm install -g safelaunch

    https://github.com/karthicedric7-cloud/safelaunch

  6. valeeraZ commented on Apr 14, 2026

    @valeeraZ

    For the environment variable, the download function only checks if the file exists, so you should be able to set PRISMA_SCHEMA_ENGINE_BINARY to an empty text file without needing to pull in prisma-engines.

    this really saved my life ! By doing this prisma won't download/check anything from binaries.prisma.sh.

    But I tried the same env var when running prisma migrate, seems it doesn't work, it needs to use the executable to connect to the database.

  7. TyIsI commented on May 8, 2026

    @TyIsI

    Btw, my workaround is to use a direnv file with use nix and the default.nix file below for my dependencies and then running prisma directly.

    {
      pkgs ? import <nixpkgs> { },
    }:
    let
    in
    pkgs.mkShell {
      buildInputs = with pkgs; [
        nodejs_24
        openssl
        pnpm
        prisma_7
      ];
    }

    Haven't tried installing on non-Nix(OS), but this works at least.

  8. bengsparks commented on May 8, 2026

    @bengsparks

    @TyIsI that's because https://github.com/NixOS/nixpkgs/blob/549bd84d6279f9852cae6225e372cc67fb91a4c1/pkgs/by-name/pr/prisma_7/package.nix#L99 specifically sets the environment variable that @niklaskorz mentioned.
    Except that it points at the prisma-engines_7 package, which are precisely the Rust binaries that this issue wants to avoid downloading.

  9. TyIsI commented on May 9, 2026

    @TyIsI

    @bengsparks exactly why I only mentioned it as a current workaround. Not as a solution. In the hopes that it would help someone else.

    Obviously it would be better to get this issue fully resolved so that no workarounds would be necessary.

  10. LewdLeah commented on Sep 27, 2026

    @LewdLeah

    Tested this fix on several unrelated NixOS servers:

    #30440

    I hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/1-unconfirmedBug should have enough information for reproduction, but confirmation has not happened yet.kind/bugA reported bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions