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条回答
Ridiculous、
2楼-- · 2019-01-03 20:04

Did you create a new project or did you clone an existing project?

If you cloned an existing project it's very important to run

composer install

That way all the dependencies that are missing will be installed.

But if you create a new project you should run this command to make a new project using composer

composer create-project laravel/laravel name-of-your-project
查看更多
戒情不戒烟
3楼-- · 2019-01-03 20:04

Just run this inside the directory where you installed your project

composer install
查看更多
劫难
4楼-- · 2019-01-03 20:05

In my case I had to enable another extension, namely php_mbstring.dll in the php.ini file before it could work. It's listed under extension=php_mbstring.dll. Find it in the php.ini file and remove the semi-colon (;) in front of it and save the file.

After this run install composer again in the root directory of your Laravel applcication and is should work.

查看更多
男人必须洒脱
5楼-- · 2019-01-03 20:06

Just run the following commands,

composer update

Or

composer install
查看更多
Bombasti
6楼-- · 2019-01-03 20:06

I had same problem with laravel and artisan, the solution:

php artisan key:generate
查看更多
再贱就再见
7楼-- · 2019-01-03 20:06

my problem is solved by

composer update
composer install
php artisan key:generate

if you any other problem you can clear cache and config Clear Route cache:

php artisan route:cache

Clear View cache:

php artisan view:clear

Clear Config cache:

php artisan config:cache
查看更多
登录 后发表回答