Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 2 years ago.
0

You can change your composer.json's "scripts" to the following to make composer clear the compiled files before updating:

"scripts": {
	"pre-install-cmd": [
		"php artisan clear-compiled"
	],
	"post-install-cmd": [
		"php artisan optimize"
	],
	"pre-update-cmd": [
		"php artisan clear-compiled"
	],
	"post-update-cmd": [
		"php artisan optimize"
	]
},

There are quite a bit of side-effects caused by the compiled.php file, and all of them can't be avoided unfortunately.

Last updated 2 years ago.
0

Ok, that worked. Thank you. Do you know why this is happening? I think some versions ago, I did not get this error.

Last updated 2 years ago.
0

As a side note to others, whom like myself, find this page when searching "artisan clear-compiled returned with an error"; I fixed this error by removing a helper file I was auto-loading that no-longer existed.

After deleting said helper file my entire Laravel app stopped working and would only render a white screen to the browser. That's when I realized I still needed to remove the helper from my composer.json file.

Last updated 2 years ago.
0

RApuzzo, thats what im getting now, any reason why the helper file is causing this?

Last updated 2 years ago.
0

Never mind figured it out, the helper file name case was not the same as what I typed in the json file... duh

Last updated 2 years ago.
0

I had the same problem, does anybody know why it happens ?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

h82 h82 Joined 1 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.