Error while upgrading from v2 to v3

I get the following error when I am trying to upgrade from v2 to v3. How can I resolve this?
No description
10 Replies
Dennis Koch
Dennis Koch11mo ago
Check your last two lines: you require Livewire v2 in your composer file and need to upgrade it to 3
ianclemence
ianclemence11mo ago
From the docs I see that I have to first upgrade filament before I upgrade Livewire. I am currently using Livewire v2.
Dennis Koch
Dennis Koch11mo ago
Not sure where you found this in the docs? You cannot upgrade to Filament 3 with LW2 as it requires version 3
ianclemence
ianclemence11mo ago
There is where I saw it. Let me try your suggestion
No description
Dennis Koch
Dennis Koch11mo ago
I think upgrade as in: Make your code work with Filament v3. Not upgrading the package.
cormac7922
cormac792211mo ago
I found that line quite misleading as well - interpreted it as "upgrade filament before upgrading livewire"
rubendn
rubendn11mo ago
I also found that line misleading and if I try to run "composer require livewire/livewire "^3.0"" to upgrade Livewire first, I get the following error:
- filament/filament is locked to version v2.17.53 and an update of this package was not requested.
- filament/filament v2.17.53 requires livewire/livewire ^2.10.7 -> found livewire/livewire[v2.10.7, ..., v2.12.6] but it conflicts with your root composer.json require (^3.0).
- filament/filament is locked to version v2.17.53 and an update of this package was not requested.
- filament/filament v2.17.53 requires livewire/livewire ^2.10.7 -> found livewire/livewire[v2.10.7, ..., v2.12.6] but it conflicts with your root composer.json require (^3.0).
Do I need to change the Filament version in Composer.json before upgrading Livewire? Thanks!
awcodes
awcodes11mo ago
Drop livewire from you composer.json and just upgrade Filament. Filament has a dependency on livewire and will therefore handle its installation and updates for you. No need to require them both in composer.
rubendn
rubendn11mo ago
After Filament is upgraded is there a need to run the automatic upgrade for Livewire "php artisan livewire:upgrade"?
awcodes
awcodes11mo ago
honestly don't know. just create another branch, run the command and if everything is ok, then you can go back to your upgrade branch and run it there.