Laravel 5 Failed opening required bootstrap/../ven

2019-01-03 19:39发布

I have recently installed Laravel 5 via composer. I tried creating a new controller using artisan and I get the following error:

bootstrap/../vendor/autoload.php. Failed to open stream: No such file or directory. The "vendor" folder does not exist.

Am I missing something?

标签: php laravel-5
25条回答
Melony?
2楼-- · 2019-01-03 19:58

If you are a Windows user you may uninstall Composer. Then install Composer. After that you install Laravel. Maybe it will work.

查看更多
三岁会撩人
3楼-- · 2019-01-03 19:58

it may be an issue with installation run following command. It worked for me

cd installationFolder
php artisan package:discover
php artisan key:generate
查看更多
干净又极端
4楼-- · 2019-01-03 19:59

I added composer.lock file to .gitignore, after commit that file to repository error is gone :)

查看更多
smile是对你的礼貌
5楼-- · 2019-01-03 20:02

Which OS you are using ? For Windows : Go to Command Prompt

set path to www/{ur project}

For me : www/laravel5

Then type this command : composer install

It will automatically install all dependency in vendor/

查看更多
Rolldiameter
6楼-- · 2019-01-03 20:02

After checking php version and a lot of research , the problem was on Composer side so just run the following command

composer install --ignore-platform-reqs

查看更多
我只想做你的唯一
7楼-- · 2019-01-03 20:03

I also had that error. But none of the above solved the issue. So i uninstalled and again installed the composer. Then i did composer update. and the problem was fixed.

查看更多
登录 后发表回答