Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

drewjo's avatar

`artisan clear-compiled` fails with "Invalid filename provided." on a fresh install

I'm not sure what has changed, but my deploys in Envoyer.io are failing now. Only big thing I did was update from Laravel ~5.1.4 to 5.1.7.

php artisan clear-compiled works locally... and I'm assuming it's because it finds the previous cache file to delete. Because doing a fresh install locally results in the same error Envoyer.io is expericing.

Specifically:

Script php artisan clear-compiled handling the post-update-cmd event returned with an error.  "Invalid filename provided."

Nothing more than that is given. :/

0 likes
5 replies
Kenneth_H's avatar

@drewjoh You are not alone. I had this exact issue when I made a test deployment to a linux server, but apart from this message everything seems to be working fine.

davidrushton's avatar
Level 5

Hi @drewjoh & @Kenneth_H ,

I too was having this error on my live /dev server with an upgrade to Laravel 5.

I initially thought https://github.com/laravel/framework/issues/9678 might help, but I will still having issues with the optimize command.

The fix was that my config/compiled.php file was out of date and had the wrong paths and files after I upgraded to Laravel 5.1.

PS. It turns out that php artisan optimize doesn't run when debug is true, unless you pass --force, which is why the error didn't happen locally.

3 likes
browner12's avatar

wanted to add another possible solution, in case these answers don't work for people. I'm not sure why this is, but I accidentally ran a composer update on my local machine, and committed the new lock file. normally i run composer update on the virtual machine. i believe this was causing the issue, but again, i'm not sure why. solution was to delete the entire vendor directory locally, and rerun the update on the virtual machine. hope this helps someone.

EDIT

ok, nm. this was not the issue. turned out to be a bad composer dependency on another package i required.

Please or to participate in this conversation.