Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bilalbasheer's avatar

Issue Adding a New Theme: Typed property Filament\Support\Assets\Asset::$package must not be accessed before initialization

public function panel(Panel $panel): Panel
    {
        return $panel
			....
            ->theme('resources/css/filament/app/theme.css')
			...
    }

I'm trying to add a new theme to my app, but I keep getting the following error:

0 likes
3 replies
bilalbasheer's avatar

@Nakov sorry its my mistake use ->viteTheme('resources/css/filament/app/theme.css') instead of ->theme('resources/css/filament/app/theme.css')

Nakov's avatar

@bilalbasheer again, I am not sure you followed the docs approach to create and build the theme. Also, are you sure this is the line that causes the error? If you comment that line out, do you still see the error?

Please or to participate in this conversation.