Using Composer Command

I have some problems.

C:/apps>composer require musonza/chat

Using version ^3.7 for musonza/chat
Root package 'musonza/chat' cannot require itself in its composer.json

I can't find the solution from anywhere. Do you know the solution?

1

2 Answers

I think you are trying to require musonza/chat in the clone of that package or your project name has the same name as the package that you want to install/require.

You should install musonza/chat on the laravel project because it's a package for laravel.

Try step below to create a laravel project :

composer create-project --prefer-dist laravel/laravel chat

go to chat folder then install the package:

composer require musonza/chat

then publish the assets of that package:

php artisan vendor:publish

See musonza_chat.php for configuration

then run the migrations:

php artisan migrate

Note: The requirement of laravel 6 is PHP 7.2 or above, so please install it

If you clone from git or downloaded run composer install instead of composer require musonza/chat

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest