3

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.

matiaslauriti
  • 7,065
  • 4
  • 31
  • 43
Ali FD
  • 33
  • 4
  • 1
    You did not add the most important part, what command did you run? If you run `composer require livewire/livewire@^3` it does not exist, it is `3.0.0-beta`, the latest version is `2.12.3`. You can check the version on [Packagist](https://packagist.org/packages/livewire/livewire) – matiaslauriti Jul 24 '23 at 14:19
  • Thats right, I run "composer need livewire/livewire:^3.0@beta" before, but now it works with "composer need livewire/livewire:3.0.0-beta.3". – Ali FD Jul 24 '23 at 14:37

3 Answers3

6

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.

Qirel
  • 25,449
  • 7
  • 45
  • 62
  • The command is not working for me. It throws `Could not parse version constraint ^3.0.*: Invalid version string "^3.0.*"` error. Also the command in the docs doesn't work either. Using `composer require livewire/livewire:v3.0.0-beta.4` for now – LTroya Jul 26 '23 at 05:08
3

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"
Sema
  • 31
  • 2
2

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.

IrfanDev
  • 21
  • 2