M
M
Mokhirjon Naimov2015-10-09 13:39:13
Composer
Mokhirjon Naimov, 2015-10-09 13:39:13

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

That is, it does not install anything! I tried composer self-updateit 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.
This was not the case before. How to fix the situation?!
PS So far, I'm installing packages through composer requier <some_package_name>the terminal.
UPD:
Some who offer to execute commands composer updateand composer requier, it is not clear that they did not really understand that I had already done this. I.e:
  • Created a project withlaravel new <project_name>
  • added to the composer.jsonpackage"laravelcollective/html": "5.1.*"
  • I ran the command composer install, displayed what I already wrote above!
  • Then I removed the package from composer.jsonand rancomposer update
  • Everything went well
  • Then again added the package to composer.jsonand executedcomposer install
  • All the same message
  • Then I removed the package fromcomposer.json
  • Added a package via composer requier, everything went well
  • Then I added another package to composer.json(barryvdh/laravel-debugbar), and ran the commandcomposer install
  • All the same messages...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor, 2015-10-09
@zvermafia

So to install a new package you either need composer require vendor/packageto composer.jsonmanually add it and then composer update vendor/package. And it composerjust reads the dependencies from the composer.lock file

U
uyrij, 2015-10-09
@uyrij

it looks like you need to check the
composer.json syntax,
remove everything from there (for the duration of the test) and do
https://getcomposer.org/doc/01-basic-usage.md
dump autoload - what will it write?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question