DEV Community

Cover image for Laravel error failed to open stream (solution) after cloning from git(Solution)
Osman Forhad
Osman Forhad

Posted on • Updated on

Laravel error failed to open stream (solution) after cloning from git(Solution)

Recently I was working on a Laravel project in my case I was got an error so I was trying to solve this error and it was a multifile procedure I was applied. I forgot what is the previous actual condition.
This time I was too much worried I was thinking about what I should do for going back to my project. Then I realize I have uploaded it on my GitHub
So, I was very happy and clone this repo and run this project again.
But it shows me an error like below:

Alt Text
In that case, I think this error generates basically composer installation purpose. So, I go to my project directory and run the composer install command on my terminal.
After that, I was happy and run that project again. But it shows me another Runtime Exception error and the error looks like below:
Alt Text
Then I think why this is happening I go to my project folder and looking for the .env file I see there was no env file. I copied a fresh .env file from the internet and I know this error for missing APP_KEY on the .env file. For that case, I go to my project directory and run PHP artisan key: generate after few seconds my terminal shows me key generation successful message.
Now I was trying again to run my project.
.
that's it.
.
Happy Coding.
osman forhad
Mobile & Web Application Developerđź’»

Top comments (0)