Trouble installing Laravel? You may need to update your composer.json file

Composer recently made a change with the way pre-update-command works and it can cause Laravel to fail to install.

Jordi Boggiano gave the following reason for the change:

as there is no composer.lock file the initial “install” is instead doing an update (as of this afternoon), which triggers the pre-update-cmd, while this was previously triggering pre-install-cmd.

Luckily the fix is easy and only requires a moving the php artisan clear-compiled to the post-update-command:

laravel-composer-change

You can see the complete changelog here.


Filed in: News / Composer


Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

SENIOR FULL STACK SOFTWARE ENGINEER
Fort Worth, Texas
Filmsupply
PHP Web Developer
Orlando, FL
Christ for all Nations
PHP Developer
Manhattan, KS (open to Remote)
CivicPlus
Mid-Senior Laravel Developer
Exeter
Optix Solutions
Full Stack Web Developer
Las Vegas, NV
V Shred
Staff Software Engineer (Laravel)
Remote
smartbnb
Software Engineer (PHP, Laravel, Vue)
Los Angeles, CA
Relocity