Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating optimized autoload files [[email protected]]: Class Illuminate\Foundation\ComposerScripts is not autoloadable, can not call post-autoload-dump script #16

Open
JohnniePeixoto opened this issue Apr 3, 2020 · 1 comment

Comments

@JohnniePeixoto
Copy link

Hi @nickfan,
i'm running on a problem when deploying my laravel project remotely to the server.

When it tries to run "composer dump-autoload --optimize" or any "php artisan..." I get the error

Generating optimized autoload files
Class Illuminate\Foundation\ComposerScripts is not autoloadable, can not call post-autoload-dump script
> @php artisan package:discover --ansi
PHP Fatal error:  Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /var/www/crechedigital.com/pre-prod/releases/release_20200403135242/bootstrap/app.php:14
Stack trace:
#0 /var/www/crechedigital.com/pre-prod/releases/release_20200403135242/artisan(20): require_once()
#1 {main}
thrown in /var/www/crechedigital.com/pre-prod/releases/release_20200403135242/bootstrap/app.php on line 14
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255

If I execute a "composer update" before on the server, it works. But I dont think it is the recommended approach. Have you already faced this or know how can I resolve?
Thanks in advance, cheers from Brazil.

@nickfan
Copy link
Owner

nickfan commented Apr 7, 2020

have you ever tried to update your global composer component by:

composer global update

or try to

composer install

not composer update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants