F
Filament14mo ago
Abi

Error after create a theme and include it on the Provider.

I created a new filament theme and included the css file to the AdminProvider class
->viteTheme('resources/css/filament/admin/theme.css')
->viteTheme('resources/css/filament/admin/theme.css')
here is the content for theme.css
@import '/vendor/filament/filament/resources/css/theme.css';
@import '../../../../vendor/archilex/filament-filter-sets/resources/css/plugin.css';

@config 'tailwind.config.js';
@import '/vendor/filament/filament/resources/css/theme.css';
@import '../../../../vendor/archilex/filament-filter-sets/resources/css/plugin.css';

@config 'tailwind.config.js';
here is the content for tailwind.config.js
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
'./vendor/archilex/filament-filter-sets/**/*.php',
'./vendor/awcodes/filament-quick-create/resources/**/*.blade.php',
'./vendor/awcodes/overlook/resources/**/*.blade.php'
],
}
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
'./vendor/archilex/filament-filter-sets/**/*.php',
'./vendor/awcodes/filament-quick-create/resources/**/*.blade.php',
'./vendor/awcodes/overlook/resources/**/*.blade.php'
],
}
I get the attached error. Can you please advice what the issue may be.
No description
Solution:
Maybe also try deleting node modules and reinstalling.
Jump to solution
6 Replies
Abi
AbiOP14mo ago
if I remove viteTheme method on the AdminProvider, I don't get the error I am on the latest filament version
Abi
AbiOP14mo ago
ran both npm run build and php artisan filament:upgrade and no issues there as well
No description
awcodes
awcodes14mo ago
Try an ‘npm update’
Solution
awcodes
awcodes14mo ago
Maybe also try deleting node modules and reinstalling.
awcodes
awcodes14mo ago
It’s weird that it’s looking for a hashed file in the node modules directory though.
Abi
AbiOP14mo ago
deleting the node modules folder helped. thank you

Did you find this page helpful?