laravel failed to open stream: No such file or directory error
29,963
Solution 1
First, make sure you have set up composer properly via composer install
.
Then, run these commands:
composer dump-autoload
composer update --no-scripts
composer update
composer install
It will just install all the dependencies as specified in the composer.lock file.composer dump-autoload
It will clean up all compiled files and their paths.composer update --no-scripts
It will Skips execution of scripts defined in composer.json file.composer update
It will update your depencencies as they are specified in composer.json file.
Solution 2
Try this command:
composer update --no-scripts
Comments
-
Lafoune almost 2 years
I just moved a Laravel project from another directory and I am having this error and I don't know where I missed, everything was right.
Warning: require(C:\xampp\htdocs\bsms\vendor\composer/../infyomlabs/laravel-generator/src/helpers.php): failed to open stream: No such file or directory in C:\xampp\htdocs\bsms\vendor\composer\autoload_real.php on line 66
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\bsms\vendor\composer/../infyomlabs/laravel-generator/src/helpers.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\bsms\vendor\composer\autoload_real.php on line 66
-
Two over 3 yearsThank you @Udhav for this concise solution