i can't access binaries.prisma.sh #29547
Replies: 4 comments
|
If the only problem is that your environment cannot reach If you still want the normal Prisma engines, configure your network/proxy to allow that host, or mirror the engine files internally and point Prisma at the mirror: PRISMA_ENGINES_MIRROR=https://your-internal-mirror.example.com npx prisma generateThat mirror has to serve the same engine files Prisma expects, so this is usually something for a company package/cache infrastructure rather than an app-level workaround. If your app is on a recent Prisma version and you only want to avoid the Rust query engine at application runtime, you can use the JS/client engine with a driver adapter. For PostgreSQL it looks roughly like this: generator client {
provider = "prisma-client"
output = "../generated/prisma"
engineType = "client"
}npm install @prisma/adapter-pgimport { PrismaPg } from "@prisma/adapter-pg"
import { PrismaClient } from "../generated/prisma/client"
const adapter = new PrismaPg({
connectionString: process.env.DATABASE_URL!,
})
export const prisma = new PrismaClient({ adapter })One important caveat: this helps with the query engine used by your app. Prisma CLI commands such as migrations can still need engine downloads depending on what you run, so in locked-down CI you may still need the allowlist/mirror solution. |
|
This is usually a network or proxy access issue, not a PostgreSQL or Node.js issue. Prisma downloads its engine files from: If that domain is blocked by your network, firewall, DNS, antivirus, company proxy, or ISP, Prisma cannot complete You have a few options. 1. Fix access to the official Prisma binary host First check whether Windows can reach it: Invoke-WebRequest https://binaries.prisma.shIf you are behind a proxy, configure npm and your environment: npm config set proxy http://your-proxy-host:port
npm config set https-proxy http://your-proxy-host:portThen reinstall and generate again: npm install
npx prisma generate2. Use a custom mirror Prisma supports For PowerShell: $env:PRISMA_ENGINES_MIRROR="https://your-mirror.example.com"
npm install
npx prisma generateOr in PRISMA_ENGINES_MIRROR=https://your-mirror.example.comImportant: this mirror must contain the correct Prisma engine files for your Prisma version and platform. It is not enough to point it to any random CDN. The files need to match the engine commit used by You can see the exact engine commit and platform Prisma expects by running: npx prisma -v3. Manually provide the engine path If you can download the engine from another machine that has access, copy it to your Windows machine and point Prisma to it. For the Node API library engine, set: $env:PRISMA_QUERY_ENGINE_LIBRARY="C:\path\to\query_engine-windows.dll.node"
npx prisma generateFor the binary engine, use: $env:PRISMA_QUERY_ENGINE_BINARY="C:\path\to\query-engine-windows.exe"
npx prisma generateMake sure the file matches the exact Prisma engine version expected by your installed Prisma package. 4. Run Prisma without Rust engine binaries If you want to avoid downloading the Prisma query engine binary entirely, use Prisma’s JavaScript driver adapter setup. For PostgreSQL, that usually means using the Install the adapter: npm install @prisma/adapter-pg pgThen configure Prisma Client to use the adapter in your application code. This removes the need for the Rust query engine at runtime, but you may still need Prisma CLI access for commands like migrations depending on your setup. Most practical fix For your case, I would first solve access to If this is a company or restricted network, ask the network admin to allow: Then delete Remove-Item -Recurse -Force node_modules
Remove-Item -Force package-lock.json
npm install
npx prisma generate |
|
If Option 1 — Use a custom binary mirror: Set this environment variable before running set PRISMA_ENGINES_MIRROR=https://binaries.prisma.shIf the domain itself is blocked, try accessing it through a VPN or proxy. You can also configure npm/Node to use a proxy: set HTTPS_PROXY=http://your-proxy:port
npm install
npx prisma generateOption 2 — Download engines manually:
Option 3 — Use the WASM engine (Prisma 6+): Prisma 6+ bundles a WASM-based query engine that doesn't need a separate binary download: generator client {
provider = "prisma-client-js"
engineType = "wasm"
}This bypasses the binary download entirely. |
|
This is a known, recurring issue with Step 1 — Confirm whether it's a network/proxy issue or the domain itself being downTest direct access from your machine: curl -I https://binaries.prisma.sh
Fix 1 — Configure a proxy if you're behind oneIf you're on a corporate network or behind a proxy, set the standard proxy environment variables before running any Prisma command: $env:HTTP_PROXY = "http://your-proxy-host:port"
$env:HTTPS_PROXY = "http://your-proxy-host:port"
npx prisma generateIf your proxy requires authentication: $env:HTTPS_PROXY = "http://username:password@your-proxy-host:port"Fix 2 — Use a mirror via
|
| Step | Try this first if... |
|---|---|
| Fix 1 (Proxy) | You're on a corporate/restricted network and curl to the domain fails with connection errors |
| Fix 2 (Mirror) | You have or can set up your own artifact mirror and are comfortable debugging checksum issues |
| Fix 3 (Accelerate/Data Proxy) | You want to permanently avoid engine binary downloads going forward |
| Fix 4 (Manual download) | You just need to unblock this one install and can reach the domain via browser even if the CLI can't |
Hope this helps — if it answers your question, would you mind closing this out or marking it resolved so others searching for the same thing can find it quickly?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Question
i can't access binaries.prisma.sh for download prisma engine for node api windows. how can I download it from another source or run without this
prisma@6.19.3
All reactions