Error when deploying to production using Laravel Forge, svg path not found

Has anyone run into this when deploying to production? I'm using laravel forge. "The path for the default set does not exist."
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

BladeUI\Icons\Exceptions\CannotRegisterIconSet

The [/home/forge/test.myapp.com/resources/svg] path for the "default" set does not exist.

at vendor/blade-ui-kit/blade-icons/src/Exceptions/CannotRegisterIconSet.php:18
14▕ }
15▕
16▕ public static function nonExistingPath(string $set, string $path): self
17▕ {
➜ 18▕ return new self("The [$path] path for the \"$set\" set does not exist.");
19▕ }
20▕
21▕ public static function prefixNotDefined(string $set): self
22▕ {
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

BladeUI\Icons\Exceptions\CannotRegisterIconSet

The [/home/forge/test.myapp.com/resources/svg] path for the "default" set does not exist.

at vendor/blade-ui-kit/blade-icons/src/Exceptions/CannotRegisterIconSet.php:18
14▕ }
15▕
16▕ public static function nonExistingPath(string $set, string $path): self
17▕ {
➜ 18▕ return new self("The [$path] path for the \"$set\" set does not exist.");
19▕ }
20▕
21▕ public static function prefixNotDefined(string $set): self
22▕ {
1 Reply
Jon Mason
Jon Mason3mo ago
At this point in the deployment, it's only started installing dependencies, and it seems that none of the directories exist yet. I'm wondering if I need to add a command to create the directory before the dependencies are installed, possibly by using one of the other composer hooks, like post-root-package-install. I tried to just SSH into the server and create the directory, but it keeps disappearing, so it seems like during the deployment it's wiping the directory. For anyone who may run into this issue in the future, I was able to resolve it by adding this to my post-autoload-dump scripts:
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"mkdir -p resources/svg",
"@php artisan package:discover --ansi",
"@php artisan filament:upgrade"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"mkdir -p resources/svg",
"@php artisan package:discover --ansi",
"@php artisan filament:upgrade"
],
Want results from more Discord servers?
Add your server
More Posts