issue with composer when deploying using Envoyer

348 views Asked by At

I'm having trouble deploying my laravel app using envoyer, the error accuer in installing composer dependencies, here it is:

Generating autoload files

Illuminate\Foundation\ComposerScripts::postInstall php artisan optimize

[RuntimeException]
No supported encrypter found. The cipher and / or key length are invalid.

it's my first time and I'm having lots of errors and don't really know how to fix them , I'd appreciate the help thanks

1

There are 1 answers

2
Abhishek Chaurasia On BEST ANSWER

You need to generate key using command php artisan generate:key

As .env is not present in production so change app.php under config file to Something like below

'key' => env('APP_KEY','base64:42KCuY7E8Zc+JHrUZFyta4yspqLAjcVZeZVvymrjZBI=')

This would solve your problem.