F
Filament16mo ago
Wiebe

Exception when using Vapor with Octane

I'm getting the following error:
Filament\Panel::getDefaultTheme(): Return value must be of type Filament\Support\Assets\Theme, null returned (View: /var/task/vendor/filament/filament/resources/views/components/layout/base.blade.php) (View: /var/task/vendor/filament/filament/resources/views/components/layout/base.blade.php) (View: /var/task/vendor/filament/filament/resources/views/components/layout/base.blade.php)
Filament\Panel::getDefaultTheme(): Return value must be of type Filament\Support\Assets\Theme, null returned (View: /var/task/vendor/filament/filament/resources/views/components/layout/base.blade.php) (View: /var/task/vendor/filament/filament/resources/views/components/layout/base.blade.php) (View: /var/task/vendor/filament/filament/resources/views/components/layout/base.blade.php)
2 Replies
Wiebe
WiebeOP16mo ago
Fixed it right now by putting the theme.css in the public folder and added this to the panel:
->theme(Theme::make('app', asset('theme.css'))->package('filament/filament'))
->theme(Theme::make('app', asset('theme.css'))->package('filament/filament'))
hm after that alpine doesn't seem to work on the second request.
andresilvagomez
andresilvagomez16mo ago
I used this code to fix all asserts
FilamentAsset::register([
Js::make('app', asset('js/filament/filament/app.js'))->core(),
Js::make('echo', asset('js/filament/filament/echo.js'))->core(),
Theme::make('app', Vite::asset('resources/css/filament/app/theme.css')),
], 'filament/filament');

FilamentAsset::register([
AlpineComponent::make('color-picker', asset('js/filament/forms/components/color-picker.js')),
AlpineComponent::make('date-time-picker', asset('js/filament/forms/components/date-time-picker.js')),
AlpineComponent::make('file-upload', asset('js/filament/forms/components/file-upload.js')),
AlpineComponent::make('key-value', asset('js/filament/forms/components/key-value.js')),
AlpineComponent::make('markdown-editor', asset('js/filament/forms/components/markdown-editor.js')),
AlpineComponent::make('rich-editor', asset('js/filament/forms/components/rich-editor.js')),
AlpineComponent::make('select', asset('js/filament/forms/components/select.js')),
AlpineComponent::make('tags-input', asset('js/filament/forms/components/tags-input.js')),
....
FilamentAsset::register([
Js::make('app', asset('js/filament/filament/app.js'))->core(),
Js::make('echo', asset('js/filament/filament/echo.js'))->core(),
Theme::make('app', Vite::asset('resources/css/filament/app/theme.css')),
], 'filament/filament');

FilamentAsset::register([
AlpineComponent::make('color-picker', asset('js/filament/forms/components/color-picker.js')),
AlpineComponent::make('date-time-picker', asset('js/filament/forms/components/date-time-picker.js')),
AlpineComponent::make('file-upload', asset('js/filament/forms/components/file-upload.js')),
AlpineComponent::make('key-value', asset('js/filament/forms/components/key-value.js')),
AlpineComponent::make('markdown-editor', asset('js/filament/forms/components/markdown-editor.js')),
AlpineComponent::make('rich-editor', asset('js/filament/forms/components/rich-editor.js')),
AlpineComponent::make('select', asset('js/filament/forms/components/select.js')),
AlpineComponent::make('tags-input', asset('js/filament/forms/components/tags-input.js')),
....
Want results from more Discord servers?
Add your server