F
Filament14mo ago
Yaeger

Unable to install Filament

Hi all! After running composer require filament/filament, I tried to access to /admin page but it gives a 404. When I try to create a filament user, it throws a cryptic error.
40 Replies
Yaeger
Yaeger14mo ago
am I forgetting a step?
Dan Harrin
Dan Harrin14mo ago
uh oh make sure you include ^2.0 in the command when installing composer remove filament/filament first
Yaeger
Yaeger14mo ago
I think I did that. Let's see yep, same thing
Yaeger
Yaeger14mo ago
Yaeger
Yaeger14mo ago
Dan Harrin
Dan Harrin14mo ago
what blade-heroicons version are you on we dont support 2.x yet
Yaeger
Yaeger14mo ago
2.1.0 ah okay, good to know But is that why I am getting that error?
Dan Harrin
Dan Harrin14mo ago
yes, for reasons. i know its unclear
Yaeger
Yaeger14mo ago
Alright, no problem
Dan Harrin
Dan Harrin14mo ago
its an issue with packagist, it installed a broken version of filament because it supported heroicons 2.x. i will contact packagist to get it removed
Yaeger
Yaeger14mo ago
That also explains why it did work in a clean laravel project, just tried that Any timeline on supporting 2.x? Or any feed I can follow to see when this gets released? Most of my projects use blade-ui-kit/blade-heroicons 2.x so I can't use filament now anywhere 😬
Dennis Koch
Dennis Koch14mo ago
Support will come with v3, but the ETA for that depends on Livewire 3
Yaeger
Yaeger14mo ago
Got it, thanks for the swift responses!
Dan Harrin
Dan Harrin14mo ago
I've contacted packagist to ensure it doesnt install the broken version
Yaeger
Yaeger14mo ago
And what about the other filament packages? Such as tables/forms? Are they supposed to work in my apps with blade-heroicons 2.x?
Yaeger
Yaeger14mo ago
Yaeger
Yaeger14mo ago
maybe not 😁 Wait it also doesn't work in a fresh project (or well, a project that doesn't have blade heroicons installed). Any ideas? filament/tables specifically "No commands in the tables namespace"
Dan Harrin
Dan Harrin14mo ago
php artisan about which version of filament
Yaeger
Yaeger14mo ago
"filament/tables": "^2.0" v2.17.33 I managed to get it working btw, but only with the "in existing projects" guide Ah! I see what's wrong. The docs are out of date php artisan notifications:install has been changed to php artisan filament:install --tables I guess? I just noticed the filament:install command
Dan Harrin
Dan Harrin14mo ago
@yaeger no you essentially need to get off of v2.17.33 that is the broken version some other dependency is forcing you to download that broken one in composer.json, try bumping the version to ^2.17.42 and composer update that should either work, or give you can error message which you can fix once you are off of v2.17.33, everything in the docs will work
Yaeger
Yaeger14mo ago
Okay thanks. I took a step back, removed filament/notifications and tried upgrading filament/tables to 2.17.42. Now everywhere I render tables, it gives the following error:
Dan Harrin
Dan Harrin14mo ago
do you have views published? please delete all published views and run filament:upgrade
Yaeger
Yaeger14mo ago
That should be in a vendor/ directory here, right?
Dan Harrin
Dan Harrin14mo ago
yeah thats good that it doesnt exist
Yaeger
Yaeger14mo ago
filament:upgrade did something
Dan Harrin
Dan Harrin14mo ago
good that clears views etc
Yaeger
Yaeger14mo ago
Ah now I got the error I also had earlier 😬 Did filament/tables recently add laravel/akaunting dependency?
Dan Harrin
Dan Harrin14mo ago
not recently, it's always been there akaunting/laravel-money
Yaeger
Yaeger14mo ago
yea that one
Dan Harrin
Dan Harrin14mo ago
what error did you get
Yaeger
Yaeger14mo ago
Hm interesting
Yaeger
Yaeger14mo ago
Yaeger
Yaeger14mo ago
This needs some explanation I have a x-money component myself
@props(['amount'])

<div {{ $attributes }}>
{{\App\Services\MoneyFormatter::format($amount)}}
</div>
@props(['amount'])

<div {{ $attributes }}>
{{\App\Services\MoneyFormatter::format($amount)}}
</div>
Dan Harrin
Dan Harrin14mo ago
can you share the error url i doubt that is anything to do with us
Yaeger
Yaeger14mo ago
Flare
Object of class Money\Money could not be converted to string - The error occurred at http://localhost:8001/dashboard/accounts/993adfdc-c0af-4803-a47a-ee3bea7c4db0
Yaeger
Yaeger14mo ago
yea the problem here is: I have a component in my project called x-money which takes :amount as Money\Money\ But akaunting/laravel-money also makes an x-money available, which takes a string as amount parameter 😂 interesting
Dan Harrin
Dan Harrin14mo ago
oof in v3 we are removing that dependency no need for it we are using PHP's built in money formatting
Yaeger
Yaeger14mo ago
Ah that explains why this didn't break in that broken build cuz that broken build is basically v3, right? 2.17.33 I'll just rename my component for now x-formatted-money or smth Got everything working. Notifications as well now. Thanks! Love what you folks built 👍
Dan Harrin
Dan Harrin14mo ago
yup lol, i tagged the wrong branch