Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer could not detect the root package (laravel/laravel) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version

I want to install LIVEWIRE in my Laravel project and when I execute the command "composer require livewire/livewire" this error is displayed to me in the terminal. How can I resolve this?

*Composer could not detect the root package (laravel/laravel) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version *

I went to the link provided and it doesn't work.

like image 614
Stavilde WEST MKG Avatar asked Aug 04 '26 19:08

Stavilde WEST MKG


1 Answers

I read from another website, that there is a need for a version in the new composer update in your composer.json Here the link: Laravel-11-Error

In the new version of Composer, I believe that after version 2.7.0, there must be a "version" property at the beginning of the file composer.json, below the "name", like this:

{
"name": "laravel/laravel",
"version": "8",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",

Just add this property and the message will disappear.

like image 119
Jakob Kichel Avatar answered Aug 07 '26 07:08

Jakob Kichel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!