Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ngozistephen's avatar

Deploying Laravel project in Railway

i am deploying my laravel project into railway server and is failing. Has anyone encountered these same error.

 >>> RUN  yarn install --frozen-lockfile

22 |

23 |     # build phase

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn install --frozen-lockfile" did not complete successfully: exit code: 1

 

Error: Docker build failed

How do i solve this error

0 likes
1 reply
Ngozistephen's avatar

In deploying a laravel project to railway, i noticed that you have to upgrade the php version to a higher version eg. "php": "^8.0.2" to "php": "^8.1".

and add this NIXPACKS_BUILD_CMD=composer install or NIXPACKS_BUILD_CMD=npm run build && composer install && php artisan optimize:clear && php artisan storage:link && php artisan migrate --force && php artisan passport:keys

if it has some packages in your package.json

Please or to participate in this conversation.