Issues Installing Version 2.x of Filament
What I am trying to do:
I'm attempting to install the 2.x version of Filament in my Laravel project
What I did:
I ran
composer require filament/filament:"^2.0.0"
to get the latest 2.x version
My issue/the error:
The Composer returns an error stating "Your requirements could not be resolved to an installable set of packages." It seems to be unable to find a matching version for the 2.x series of Filament. I'm attaching the error screenshot
Code:
Here's the relevant part of my composer.json:
8 Replies
Try filament/filament: “^2.0” I don’t think you need the last 0
Thank you for the suggestion. I tried running
composer require filament/filament:"^2.0"
without the last 0 as you suggested, but I'm still encountering a similar error. The terminal outputs this error message (I'm also attaching a screenshot):
- Root composer.json requires filament/filament 2.0 (exact version match: 2.0, 2.0.0 or 2.0.0.0), found filament/filament[dev-3.x-alpha, v0.1.0, v1.0.0, ..., 1.x-dev, v2.0.0-beta1, ..., 2.x-dev, v3.0.0-alpha1, ..., 3.x-dev] but it does not match the constraint.Hmm. Something weird is going on. Any reason for the v2 install though. The latest is v3.
I will join a team that uses Filament v2, (filament tables), for their project.
With the latest Laravel and Livewire versions, I noticed Filament v3 installs without issues. Could there be only a specific Laravel and Livewire versions that are compatible with Filament v2 that I might be missing? My current composer.json setup:
Also, I've noticed that running
php artisan about
does not show Livewire's version, even though it's installed according to my composer.json. (screenshot of terminal for reference). Could this be related to the installation of v2 issue?
Any guidance would be very helpful!You could try with laravel 9 instead of 10
I will join a team that uses Filament v2, (filament tables), for their project.So why do you install Filament then? It should be installed in their project already? Just check it out and run composer install?
I've tried with Laravel 9 and Livewire 2 but still the problem remains
I haven't joined them yet, but Yes, when I modify my composer json with all the dependencies and run composer install, it installs, yet I think it's an issue not being able to install it the way the docs says, and wanted to know if I may be doing something wrong. Or if there is something wrong that could cause more problems later on.
when I modify my composer json with all the dependenciesWhat did you modify? Sounds like you just didn't have the correct requirements and therefore it couldn't install Also sounds like a Windows issue. You pass
^2.0
in the constrained, but in the message it said 2.0
is too strict. So it ignored ^
. Maybe Powershell related?