DEV Community

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

Posted on • Edited 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💻

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay