Back to blog

Prisma Studio on Linux: `spawn xdg-open ENOENT` — Root Cause, Fix, and Environment Hardening

3/8/2026 · 1 min · DevOps

Share

Prisma Studio on Linux: spawn xdg-open ENOENT — Root Cause, Fix, and Environment Hardening

Running:

pnpm prisma studio

may return:

Error: spawn xdg-open ENOENT

while Prisma Studio still starts on localhost. This means the service is healthy; only the OS browser helper is missing.

Why this happens

Node tries to spawn xdg-open to open the browser automatically. In headless SSH sessions, minimal Docker images, or WSL contexts without proper GUI bridging, that binary is unavailable.

Fast diagnostics

which xdg-open
curl -I http://localhost:51212

If Prisma port responds, this is not a database/runtime failure.

Engineering fixes

  1. Manual browser open (quick support fix).
  2. Install xdg-utils on desktop Linux.
  3. Preferred for server/CI: disable auto-open.
pnpm prisma studio --browser none
# or
BROWSER=none pnpm prisma studio

WSL nuance

In WSL, use wslview (from wslu) to open links in Windows browser, or keep --browser none and open manually.

DevOps hardening

Conclusion

spawn xdg-open ENOENT is an environment integration issue between Prisma/Node and OS graphical helpers. Apply environment-specific policy and keep runtime behavior explicit for predictable operations.

CC BY-NC

This post is licensed under CC BY-NC.

Comments

Join the discussion below.