Issue with Playwright/Chromium dependencies in Nixpacks (Node.js)
serbiaserbia
HOBBYOP

2 days ago

Hi Railway Support team,

I am currently deploying a Node.js application (OpenClaw) using the default Nixpacks build system. My application requires Playwright (Chromium) for browser automation tasks, but I am unable to get Chromium to launch successfully.

Even after trying several configuration steps, I consistently encounter the following error:

error while loading shared libraries: libnspr4.so: cannot open shared object file: No such file or directory

My openClaw is installed Railway template - https://github.com/codetitlan/openclaw-railway-template

What I have tried so far:

Setting NIXPACKS_PLAYWRIGHT_CHROME_DEPS=1 in environment variables.

Adding various packages to NIXPACKS_APT_PKGS (including libnss3, libnspr4, libgbm1, etc.).

Adding chromium to NIXPACKS_PKGS.

Creating a local Dockerfile and railway.toml in the workspace to force a Docker build, but the system seems to persist with the Nixpacks cached build or ignores the local overrides.

My goal:

I want to ensure that all necessary system-level dependencies for Playwright/Chromium are correctly installed and available in the runtime environment.

Could you please advise on the recommended way to handle Playwright dependencies within a Nixpacks-based Node.js deployment, or check why my environment variable overrides for APT packages aren't taking effect?

Thank you for your help!

$10 Bounty

0 Replies

Railway
BOT

2 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 1 day ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...