Search code examples
phplaraveldocker-composelaravel-livewirelaravel-jetstream

Jetstream/Livewire package not installing


I installed a new laravel 8 project and tried to install Jetstream/Livewire but its giving me this error:

Your requirements could not be resolved to an installable set of packages.

 Problem 1
- laravel/jetstream[v2.11.0, ..., 2.x-dev] require illuminate/console ^9.21 -> found illuminate/console[v9.21.0, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/jetstream ^2.11 -> satisfiable by     laravel/jetstream[v2.11.0, v2.11.1, v2.11.2, 2.x-dev].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require laravel/jetstream:*" to figure out if any version is installable, or "composer require laravel/jetstream:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I tried composer clear-cache and composer self-update and it still didn't work.

P.S I have to use laravel 8 because i'm on a tutorial that uses it.


Solution

  • I had to be specific with which version of jetstream/livewire I wanted to install and also had to allow all dependencies of the version to be installed, updated or downgraded. This is the code I tried

    composer require laravel/jetstream:^2.1 --with-all-dependencies
    

    AND

    php artisan jetstream:install livewire