15 days ago
I have a deployment activate and make a little code change and on pushing, I'm getting this now. It's s laravel app but somehow RailPack seems not to detected the package.json in other to set up node
↳ Detected Php
Packages
──────────
php │ 8.4.18 │ railpack default (8.4)
sh: 1: npm: not found
Build Failed: build daemon returned an error < failed to solve: process "sh -c npm run build:ssr" did not complete successfully: exit code: 127 >
2 Replies
15 days ago
El error ocurre porque Railway solo detecta PHP. Como el package.json no está en la raíz del proyecto, Nixpacks no activa el entorno Node, por eso npm no existe. La solución es mover package.json a la raíz del proyecto para que Railway detecte y configure automáticamente Node junto con PHP.
15 days ago
package.json should be in the root directory in order for Railpack to install node.js. Check the docs here.