a year ago
Only happens when I add the npm run build command, but I need it to generate the manifest.json.
Variables ->
NIXPACKSBUILDCMD
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
NIXPACKSNOCACHE = 1
Logs:
#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
2 Replies
a year ago
full build logs please -
a year ago
im sorry but i wont be able to help unless you can provide logs generated by the bookmarklet
a year ago
follow the instructions
a year ago
send your package.json please
{
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.2",
"alpinejs": "^3.4.2",
"autoprefixer": "^10.4.2",
"axios": "^1.6.4",
"laravel-vite-plugin": "^1.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.1.0",
"vite": "^5.0"
}
}
a year ago
move those dev dependencies to just a dependencies object
But now it doesn't load the CSS.
Dev Tools Terminal Error
Mixed Content: The page at 'https://library-php-production-1bc2.up.railway.app/login' was loaded over HTTPS, but requested an insecure stylesheet 'http://library-php-production-1bc2.up.railway.app/build/assets/app-6MzHoY9L.css'. This request has been blocked; the content must be served over HTTPS.
This is how I reference the css in this view with Vite.
@vite(['resources/css/app.css', 'resources/js/app.js'])
a year ago
make sure you are loading your assets over https
7 months ago
Hi, could you fix the problem? I am having the same issue.
5 months ago
Hello, were you able to deploy your laravel 11 app?