Filament v3 - Vite Issue

I installed Filament, and also the filament/forms And I got this error after running npm run dev
[vite] Internal server error: Failed to load PostCSS config (searchPath: /Users/vahnmarty/Projects/myproj): [SyntaxError] Unexpected token 'export'
/Users/vahnmarty/Projects/myproj/postcss.config.js:1
export default {
^^^^^^

SyntaxError: Unexpected token 'export'
[vite] Internal server error: Failed to load PostCSS config (searchPath: /Users/vahnmarty/Projects/myproj): [SyntaxError] Unexpected token 'export'
/Users/vahnmarty/Projects/myproj/postcss.config.js:1
export default {
^^^^^^

SyntaxError: Unexpected token 'export'
Solution:
When you say "I installed Filament" did you mean "Panels", if yes then no need to install filament/forms separately
Jump to solution
12 Replies
Solution
Vp
Vp11mo ago
When you say "I installed Filament" did you mean "Panels", if yes then no need to install filament/forms separately
Vp
Vp11mo ago
And that maybe the problem
vahnmarty
vahnmarty11mo ago
Ohhhh. should I remove it from composer? Yea you are right, I installed filament then installed the forms.
Vp
Vp11mo ago
Yes, remove it and hope it's works
vahnmarty
vahnmarty11mo ago
damn, I really don't know what a Panel is. Is it a replacement for Forms? I'm new to v3.
Vp
Vp11mo ago
No, In my understanding a Panel is like admin panel.. in v3 you can have multiple panel like, admin panel, employer panel etc. and panel has include everything out of the box (means table, forms, action, noti etc are already included). The other form builder, table builder etc can be used if you don't want Panel also, that's why they're called as stand-alone.. hope you understand
vahnmarty
vahnmarty11mo ago
Ahh. Since I'm using it for my custom forms (not using Admin). Should I install filament/forms ?
Vp
Vp11mo ago
Yes..
vahnmarty
vahnmarty11mo ago
I installed forms, now I'm back with my previous error. something to do with this
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
maybe it's a PostCSS v8 issue?
vahnmarty
vahnmarty11mo ago
It's actually a laravel 9, just upgraded laravel 10. And installed Filament v3. Yes, I checked that. "Existing Laravel Project" Oh I got it now. It says Create a new tailwind.config.js file and add the Filament preset (includes the Filament color scheme and the required Tailwind plugins): emphasis on ADD. I thought I'm going to replace everything lol.
vahnmarty
vahnmarty11mo ago
Finally.