R
Railwayβ€’2y ago
Issam

Laravel app build failing

I have a Laravel app that I'm trying to deploy on Railway, but the build keeps failing:
Generating optimized autoload files

> Illuminate\Foundation\ComposerScripts::postAutoloadDump

> @php artisan package:discover --ansi



In Request.php line 321:

Symfony\Component\HttpFoundation\Request::create(): Argument #1 ($uri) must
be of type string, null given, called in /workspace/vendor/laravel/framewo
rk/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32



Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Generating optimized autoload files

> Illuminate\Foundation\ComposerScripts::postAutoloadDump

> @php artisan package:discover --ansi



In Request.php line 321:

Symfony\Component\HttpFoundation\Request::create(): Argument #1 ($uri) must
be of type string, null given, called in /workspace/vendor/laravel/framewo
rk/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32



Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
I have tried using both Nixpacks and Heroku Buildpacks, both throw the same error. Any idea on what's causing this?
4 Replies
nebula
nebulaβ€’2y ago
can you send the full build logs using Nixpacks
Issam
Issamβ€’2y ago
here's the full log: https://pastebin.com/BGRfAHLA
Pastebin
==============Using Nixpacks============== ╔═══════════════════════...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Issam
Issamβ€’2y ago
UPDATE: found the problem, All I had to do was to set up the env variable APP_URL for it to work.
nebula
nebulaβ€’2y ago
πŸŽ‰ i'll close this then