Answer the question
In order to leave comments, you need to log in
Composer doesn't want to install packages, what's the reason?
I work on the Laravel 5 framework. I add a package, for example , "laravelcollective/html": "5.1.*"
to composer.json
, then I do composer install
. And composer gives me:
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Nothing to install or update
Generating autoload files
> php artisan clear-compiled
> php artisan optimize
Generating optimized class loader
composer self-update
it didn't help. Then composer update
, added the package to composer.json
, then tried again composer install
, no change still the same error/information is entered. composer requier <some_package_name>
the terminal. composer update
and composer requier
, it is not clear that they did not really understand that I had already done this. I.e:laravel new <project_name>
composer.json
package"laravelcollective/html": "5.1.*"
composer install
, displayed what I already wrote above!composer.json
and rancomposer update
composer.json
and executedcomposer install
composer.json
composer requier
, everything went wellcomposer.json
(barryvdh/laravel-debugbar), and ran the commandcomposer install
Answer the question
In order to leave comments, you need to log in
So to install a new package you either need composer require vendor/package
to composer.json
manually add it and then composer update vendor/package
. And it composer
just reads the dependencies from the composer.lock file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question