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条回答
Root(大扎)
2楼-- · 2019-01-03 20:10

Following this below step solved my problem. You may try

composer update --no-scripts 
composer update
查看更多
爷的心禁止访问
3楼-- · 2019-01-03 20:11

Just setup a new project using composer instead of laravel like this:

composer create-project --prefer-dist laravel/laravel myProje
查看更多
太酷不给撩
4楼-- · 2019-01-03 20:15

I got this when I did composer update instead of composer install.

查看更多
乱世女痞
5楼-- · 2019-01-03 20:16

go to your project folder via cmd. run the following command

composer update

it will install missing vendor folder and files in your project.

but in some cases it gives error like " Your configuration does not allow connection to bla bla bla.." in cmd.

for that go to your composer.json file,

change "secure-http": true to "secure-http": false

but in some cases (as was in my case) you may not find such line in your file. for that do the following action:

change "config": { "preferred-install": "dist" }

to

"config": {
    "preferred-install": "dist",
    "secure-http": false
}

and run again composer update command.

hope this will solve problem of many persons. :)

查看更多
虎瘦雄心在
6楼-- · 2019-01-03 20:17

Run composer with --no-scripts

composer update --no-scripts  

This shall fix the issue. I tried this on Mac and Linux.

查看更多
劳资没心,怎么记你
7楼-- · 2019-01-03 20:19

Run composer install in your root project folder (or php composer.phar install).

查看更多
登录 后发表回答