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:
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8",
"livewire/livewire": "2.11.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.1",
"spatie/laravel-ignition": "^2.0"
},
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8",
"livewire/livewire": "2.11.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.1",
"spatie/laravel-ignition": "^2.0"
},
No description
8 Replies
awcodes
awcodes9mo ago
Try filament/filament: “^2.0” I don’t think you need the last 0
Arthayzen
Arthayzen9mo ago
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.
No description
awcodes
awcodes9mo ago
Hmm. Something weird is going on. Any reason for the v2 install though. The latest is v3.
Arthayzen
Arthayzen9mo ago
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:
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8",
"livewire/livewire": "2.11.0"
},
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8",
"livewire/livewire": "2.11.0"
},
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!
No description
Tieme
Tieme9mo ago
You could try with laravel 9 instead of 10
Dennis Koch
Dennis Koch9mo ago
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?
Arthayzen
Arthayzen9mo ago
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.
Dennis Koch
Dennis Koch9mo ago
when I modify my composer json with all the dependencies
What 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?
Want results from more Discord servers?
Add your server