F
Filamentβ€’6mo ago
BlackShadow

Plugin skeleton npm build

Error: Failed to find '../../vendor/filament/filament/resources/css/theme.css'
Error: Cannot find module './vendor/filament/filament/tailwind.config.preset'
Error: Failed to find '../../vendor/filament/filament/resources/css/theme.css'
Error: Cannot find module './vendor/filament/filament/tailwind.config.preset'
Solution:
"filament/filament": "^3.0",
Jump to solution
18 Replies
BlackShadow
BlackShadowβ€’6mo ago
npm run build
npm run build
toeknee
toekneeβ€’6mo ago
You need to install composer
BlackShadow
BlackShadowβ€’6mo ago
I did
No description
toeknee
toekneeβ€’6mo ago
and you ran php ./configure.php ? and npm install && npm run build
BlackShadow
BlackShadowβ€’6mo ago
Yep Im gonna delete the entire repo and try again.. Same 🀷
toeknee
toekneeβ€’6mo ago
You building a theme?
BlackShadow
BlackShadowβ€’6mo ago
No just a field with some custom css
toeknee
toekneeβ€’6mo ago
Unsure why it's going for css/theme since that's a theme. Mine goes for my plugin css file
BlackShadow
BlackShadowβ€’6mo ago
@import '../../vendor/filament/filament/resources/css/theme.css';
@import '../../vendor/filament/filament/resources/css/theme.css';
This is in the default css file Removing it will work but then the next error comes up:
> build:styles
> npx tailwindcss -i resources/css/index.css -o resources/dist/filament-rating-field.css --postcss --minify && npm run purge


Rebuilding...
Error: Cannot find module './vendor/filament/filament/tailwind.config.preset'
Require stack:
> build:styles
> npx tailwindcss -i resources/css/index.css -o resources/dist/filament-rating-field.css --postcss --minify && npm run purge


Rebuilding...
Error: Cannot find module './vendor/filament/filament/tailwind.config.preset'
Require stack:
I can't remember this happening on my first 2 plugins. πŸ€”
toeknee
toekneeβ€’6mo ago
And if filament is installed with composer in the plugin then.... it should exist
BlackShadow
BlackShadowβ€’6mo ago
"require": {
"php": "^8.1",
"filament/forms": "^3.0",
"spatie/laravel-package-tools": "^1.15.0",
"illuminate/contracts": "^10.0"
},
"require": {
"php": "^8.1",
"filament/forms": "^3.0",
"spatie/laravel-package-tools": "^1.15.0",
"illuminate/contracts": "^10.0"
},
toeknee
toekneeβ€’6mo ago
filament-forms not filamentphp by the looks of it
Solution
toeknee
toekneeβ€’6mo ago
"filament/filament": "^3.0",
BlackShadow
BlackShadowβ€’6mo ago
Mmm, my select tree has the same composer.json file where it does work πŸ€” But yea this works! Maybe something changed with the template between now and then πŸ˜†
toeknee
toekneeβ€’6mo ago
Sounds like you selected only for forms
BlackShadow
BlackShadowβ€’6mo ago
It should be only for forms since its a field.
toeknee
toekneeβ€’6mo ago
So you'll need to really import the field css which should exist somehwere in forms. Might have too much natively
BlackShadow
BlackShadowβ€’6mo ago
Looks like this works fine, lets hope it not the "wrong" way.