Error while installing livewire 3 through composer

2.4k Views Asked by At

I have some problems with installing livewire 3 package, I am getting this:

Problem 1
Root composer.json requires livewire/livewire 3.0@beta, found livewire/livewire[dev-throw-error-when-testing-non-livewire-class, ..., dev-bad-hotfix-test, v0.0.1, ..., v0.7.4, v1.0.0, ..., 1.x-dev, v2.0.0, ..., 2.x-dev, v3.0.0-beta.1, v3.0.0-beta.2, v3.0.0-beta.3] but it does not match the constraint.
Installation failed, reverting ./composer.json and ./composer.lock to their original content

installing livewire 3 like website document.

3

There are 3 best solutions below

1
Qirel On BEST ANSWER

You would be able to install the beta of Livewire v3 with the following command,

composer require livewire/livewire "^3.0.*@beta"

Since Livewire v3 still is in beta, you need to append the @beta flag.

0
Sema On

The docs at livewire suggest you use:

composer require livewire/livewire:^3.0@beta

If that fails, try to add quotes around the version number and beta flag

composer require livewire/livewire "^3.0@beta"
1
IrfanDev On

I tried following the docs which suggests to write:

composer require livewire/livewire "^3.0@beta"

Then I followed @Qirel's reply which is:

composer require livewire/livewire "^3.0.*@beta"

and I managed to install Livewire V3 in my Laravel project.