I had a problem with Basset package (website didn’t load, it kept timing out) so I tried to remove it from the composer.json
file to see if it helps. After running php composer.phar update
I got this error:
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
You can even get this error:
Script php artisan optimize handling the post-update-cmd event returned with an error
To fix this error open your composer.json
file and delete the scripts key (or just the part that fails – in bold). In my case it was this:
"scripts": { "pre-update-cmd": [ "php artisan clear-compiled" ], "post-install-cmd": [ "php artisan optimize" ], "post-update-cmd": [ "php artisan optimize" ] },
I ran php composer.phar update
again and it worked.
Some people report that after this they have problems with running php artisan optimize
and few others . I didn’t have this problem but if you have it then delete the app/bootstrap/compiled.php
file and then try running php composer.phar update