Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Mastertech01's avatar

php artisan error(failed to open stream: No such file or directory)

hello everyone, I am cloning a project on Github, I followed the tutorial steps listed bellow

clone the repo

$ git clone https://github.com/coreui/coreui-free-laravel-admin-template.git my-project

go into app's directory

$ cd my-project

install app's dependencies

$ composer install

install app's dependencies

$ npm install

the above stages were successful and I have connected the .env to myql database

the next stage which is

in your app directory

generate laravel APP_KEY

$ php artisan key:generate

i have tried everything possible to pass this stage is showing me error. i have use composer update, composer dumpautoload still giving me same error.. this the error message ODUMS@ODUM MINGW64 /c/_project/web/prediction (master) $ php artisan

Warning: require(C:_project\web\prediction/vendor/autoload.php): failed to open stream: No such file or directory in C:_project\web\prediction\artisan on line 18

Fatal error: require(): Failed opening required 'C:_project\web\prediction/vendor/autoload.php' (include_path='.;C:\php\pear') in C:_project\web\prediction\artisan on line 18

I also included the (include_path='.;C:\php\pear) in artisan file still giving me error

how will I resolve....

0 likes
7 replies
neilstee's avatar

@mastertech01 looks like your composer install wasn't successful at all.

require(C:_project\web\prediction/vendor/autoload.php): failed to open stream: No such file or directory in C:_project\web\prediction\artisan on line 18 this error means you don't have the vendor/autoload.php which can be only generated via composer.

Are you sure you are in the correct directory?

1 like
neilstee's avatar

@mastertech01 you might think that your composer install was a success but wasn't mainly because your PHP version is not compatible?

On this package, it requires PHP 7.2.5.

Check your PHP version first.

2 likes
Mastertech01's avatar

Thanks, i have upgraded my php version to 7.4.13 because its one of the requirement to install laravel 8 and also updated composer to 2.0.8, respectively it was successful but still getting the same error

1 like
mcangueiro's avatar

Something doesn't feel right with your paths.

Looking at this it seems you are on a Windows machine and the paths seem to be missing a slash just after the colon.

C:_project\web\prediction/vendor/autoload.php

This is not a valid path, there's a slash missing as I said.

1 like
samir20-23's avatar

the problem is error:

ext xml

ext dom

fix : open new terminal and run this : [

sudo apt update
sudo apt install php-xml
php -m | grep -E "xml|dom" 

] open laravel project in terminal and run : [

composer install

] now boom is fexed you can see the folder /vendor now .

1 like
quintinmorrow's avatar

Missing vendor folder after composer install on Windows is almost always a path issue or a silent composer failure. The backslash vs forward slash mixing in those paths is a red flag specific to Windows environments running Git Bash or MinGW. Worth trying the same commands in a plain Command Prompt or PowerShell instead of MINGW64, since Git Bash sometimes mangles Windows paths in ways that break composer's directory resolution completely.

1 like
vincent15000's avatar

Why don't you install the project on a virtual machine (VirtualBox ?) with Ubuntu ?

Please or to participate in this conversation.