F
Filamentβ€’11mo 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
BlackShadowOPβ€’11mo ago
npm run build
npm run build
toeknee
toekneeβ€’11mo ago
You need to install composer
BlackShadow
BlackShadowOPβ€’11mo ago
I did
No description
toeknee
toekneeβ€’11mo ago
and you ran php ./configure.php ? and npm install && npm run build
BlackShadow
BlackShadowOPβ€’11mo ago
Yep Im gonna delete the entire repo and try again.. Same 🀷
toeknee
toekneeβ€’11mo ago
You building a theme?
BlackShadow
BlackShadowOPβ€’11mo ago
No just a field with some custom css
toeknee
toekneeβ€’11mo ago
Unsure why it's going for css/theme since that's a theme. Mine goes for my plugin css file
BlackShadow
BlackShadowOPβ€’11mo 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β€’11mo ago
And if filament is installed with composer in the plugin then.... it should exist
BlackShadow
BlackShadowOPβ€’11mo 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β€’11mo ago
filament-forms not filamentphp by the looks of it
Solution
toeknee
toekneeβ€’11mo ago
"filament/filament": "^3.0",
BlackShadow
BlackShadowOPβ€’11mo 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β€’11mo ago
Sounds like you selected only for forms
BlackShadow
BlackShadowOPβ€’11mo ago
It should be only for forms since its a field.
toeknee
toekneeβ€’11mo ago
So you'll need to really import the field css which should exist somehwere in forms. Might have too much natively
BlackShadow
BlackShadowOPβ€’11mo ago
Looks like this works fine, lets hope it not the "wrong" way.
Want results from more Discord servers?
Add your server