I have reproduced the issue on the latest CLI version.
Yes, I am on the latest version
I have searched existing posts and this report is not a duplicate.
Yes, this isn’t a duplicate
In which of these areas are you experiencing a problem?
Other
Expected behavior
When running npm run dev on a read-only file system (like NixOS), the Shopify CLI should:
Respect the SHOPIFY_CLI_CLOUDFLARED_PATH environment variable to use the system-installed cloudflared binary without crashing.
OR, attempt to download/write the bundled cloudflared binary to a standard writable user directory (e.g., $XDG_CACHE_HOME or ~/.cache/shopify) instead of trying to write directly into node_modules (which is immutable on NixOS).
Actual behavior
The CLI attempts to download and write cloudflared into the node_modules folder inside /nix/store/…, resulting in an EROFS: read-only file system error.
When attempting to bypass this by setting SHOPIFY_CLI_CLOUDFLARED_PATH=$(which cloudflared), the CLI fails with an “Unknown error” and cannot manage the tunnel process.
Consequence: I am forced to run a manual anonymous tunnel (cloudflared tunnel --url …), but this triggers Cloudflare Rate Limits (HTTP 429) very quickly because it lacks the authenticated context that the Shopify CLI normally provides.
Reproduction steps
On a NixOS machine, install a Shopify app project.
Run npm run dev.
Error 1: The process crashes immediately with EROFS when trying to write the cloudflared binary to node_modules.
Install cloudflared via Nixpkgs.
Run SHOPIFY_CLI_CLOUDFLARED_PATH=$(which cloudflared) npm run dev.
Error 2: The CLI fails to start the tunnel with an “Unknown error” or fails to parse the output of the system binary.
Verbose output
[daniel@nixos:~/blockchain-warranty-app/nft-warranty]$ npm run dev
dev
shopify app dev
…
╭─ error ──────────────────────────────────────────────────────────────────────╮
│ │
│ EROFS: read-only file system, open ‘/nix/store/…/node_modules/@shopify/ │
│ cli/bin/cloudflared’ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Operating system
NixOS (linux)
CLI version
3.86.1
Shell
Bash / Nix Shell
Nodejs version
v22.21.1
What language and version are you using in your application?
nodejs v22.21.1
