ThaWill
npm run build doesn't work, Laravel 11 + Vite
Only happens when I add the npm run build command, but I need it to generate the manifest.json.
Variables ->
NIXPACKS_BUILD_CMD
NIXPACKS_NO_CACHE = 1
Logs:
composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force
composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force
#15 3.701 sh: 1: vite: not found
#15 ERROR: process "/bin/bash -ol pipefail -c composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force" did not complete successfully: exit code: 127
-----
> [11/12] RUN composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force:
WARN config production Use `--omit=dev` instead.
3.480
3.480 up to date, audited 1 package in 591ms
3.481
3.481 found 0 vulnerabilities
3.695
3.695 > build
3.695 > vite build
3.695
3.701 sh: 1: vite: not found
-----
Dockerfile:25
-------------------
23 | # build phase
24 | COPY . /app/.
25 | >>> RUN composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force
26 |
27 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force" did not complete successfully: exit code: 127
Error: Docker build failed
#15 3.701 sh: 1: vite: not found
#15 ERROR: process "/bin/bash -ol pipefail -c composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force" did not complete successfully: exit code: 127
-----
> [11/12] RUN composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force:
WARN config production Use `--omit=dev` instead.
3.480
3.480 up to date, audited 1 package in 591ms
3.481
3.481 found 0 vulnerabilities
3.695
3.695 > build
3.695 > vite build
3.695
3.701 sh: 1: vite: not found
-----
Dockerfile:25
-------------------
23 | # build phase
24 | COPY . /app/.
25 | >>> RUN composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force
26 |
27 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c composer install && npm install --production && npm run build && php artisan optimize && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan migrate --force" did not complete successfully: exit code: 127
Error: Docker build failed
21 replies