Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.2 - bootstrap/cache/services.php missing

After I ran composer update/ install then when I run php artisan cache:clear. I got the following error.

[ErrorException] file_put_contents({application-root-path}/bootstrap/cache/services.php): failed to open stream: No such file or directory

Is there any command able to re-cache the file? As for now no matter what php artisan function that I run also will caught into the same error.

p/s: Please comment below if you need me to provide any further information for debug use.

like image 682
Keith Yeoh Avatar asked Jul 05 '16 16:07

Keith Yeoh


3 Answers

make sure to run this command:

sudo chmod 777 -R bootstrap/cache
like image 143
Paul Androschuk Avatar answered Nov 07 '22 08:11

Paul Androschuk


Just type:

cd bootstrap/
mkdir cache
cd .. 
composer install
like image 26
grondon Avatar answered Nov 07 '22 06:11

grondon


run this command

php artisan optimize --force

it will create services.php and compiled.php

like image 9
Ganesh Kandu Avatar answered Nov 07 '22 06:11

Ganesh Kandu