lib/package_managers/pnpm.sh (package_managers::pnpm::install_dependencies) always installs with:
pnpm_install_args=("install" "--prod=false" "--frozen-lockfile")
pnpm 12 (the new Rust/pacquet CLI) declares --prod as a bare boolean flag and no longer accepts a value, so the very first install step fails before anything runs:
Running 'pnpm install' with pnpm-lock.yaml
error: unexpected value 'false' for '--prod' found; no more were expected
Usage: pnpm install --prod
This is the same flag-compat issue tracked in pnpm/pnpm#14281, and it's why Railway already dropped --prod=false (railwayapp/railpack commit 373541d).
Suggested fix: pnpm >=10 ignores NODE_ENV and installs dev + prod deps by default, so --prod=false is a no-op there. Branch on the pnpm major (as the buildpack already does for the store-dir env var) and omit the flag for pnpm >=10:
if (( pnpm_major < 10 )); then
pnpm_install_args=("install" "--prod=false" "--frozen-lockfile")
else
pnpm_install_args=("install" "--frozen-lockfile")
fi
Repro verified locally: pnpm@12.3.4 install --prod=false exits 2 with that exact message; pnpm@11.26.0 accepts it.
lib/package_managers/pnpm.sh(package_managers::pnpm::install_dependencies) always installs with:pnpm 12 (the new Rust/pacquet CLI) declares
--prodas a bare boolean flag and no longer accepts a value, so the very first install step fails before anything runs:This is the same flag-compat issue tracked in pnpm/pnpm#14281, and it's why Railway already dropped
--prod=false(railwayapp/railpack commit 373541d).Suggested fix: pnpm >=10 ignores
NODE_ENVand installs dev + prod deps by default, so--prod=falseis a no-op there. Branch on the pnpm major (as the buildpack already does for the store-dir env var) and omit the flag for pnpm >=10:Repro verified locally:
pnpm@12.3.4 install --prod=falseexits 2 with that exact message;pnpm@11.26.0accepts it.