Laravel deployment failing
Hi, wondered if anyone had come across this before whilst deploying a laravel app on railway?
I get the following error:
7.521 Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
-----
Dockerfile:20
-------------------
18 | COPY . /app/.
19 | RUN mkdir -p /var/log/nginx && mkdir -p /var/cache/nginx
20 | >>> RUN composer install --ignore-platform-reqs
21 | RUN yarn install --frozen-lockfile
22 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c composer install --ignore-platform-reqs" did not complete successfully: exit code: 255
Error: Docker build failed
4 Replies
Project ID:
2a2c491d-831b-4919-8a9a-e6633df12f20
Project id : 2a2c491d-831b-4919-8a9a-e6633df12f20
do you use nixpack with php 8?
I am not sure to be honest I do think it is an issue with nixpack using php 8 instead of 7.1 that my project is currently working on. Is there a way to control the version of php?
So got A bit further.
I am using nixpacks php.
Set it to 8.2 php part all installing ok. Now a problem with the node part of the build.
Set the node version to same I am running locally. 16. But seeing this error when I get to npm run prod
#15 3.229 at /app/node_modules/webpack/lib/NormalModuleFactory.js:138:29
#15 3.229 at /app/node_modules/webpack/lib/NormalModuleFactory.js:342:9
#15 3.229 at processTicksAndRejections (node:internal/process/task_queues:78:11)
#15 3.441 node:internal/crypto/hash:71
#15 3.441 this[kHandle] = new _Hash(algorithm, xofLen);
#15 3.441 ^
#15 3.441
#15 3.441 Error: error:0308010C:digital envelope routines::unsupported