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:


You can see the complete changelog here.

Filed in: News / Composer


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

Laravel News Partners

Laravel Jobs

Laravel + Vue.JS developer
Remote or in Toronto Canada
Star Dot Hosting Inc
Full Stack or Back-End Developer
Alexandria, VA; Tallahassee, FL; Orlando, FL
Marketing for Change
Senior Quality Assurance Engineer
Bisnow Media
Senior PHP/Laravel Developer: Your Dream Work Environment
iPhone Photography School
Senior Software Engineer
Remote or San Francisco
Laravel Developer
Las Vegas, NV
V Shred
R&D Developer
Denver, CO