Reputation: 69
I'm setting up my Laravel environment, having installed composer and laravel. I can't call php artisan
I've tried installing and updating, however I'm still being returned errors.
C:\Users\Pat\personal> php artisan PHP Warning: require(C:\Users\Pat\personal/vendor/autoload.php): failed to open stream: No such file or directory in C:\Users\Pat\personal\artisan on line 18
Warning: require(C:\Users\Pat\personal/vendor/autoload.php): failed to open stream: No such file or directory in C:\Users\Pat\personal\artisan on line 18 PHP Fatal error: require(): Failed opening required 'C:\Users\Pat\personal/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\Users\Pat\personal\artisan on line 18
Fatal error: require(): Failed opening required 'C:\Users\Pat\personal/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\Users\Pat\personal\artisan on line 18 PS C:\Users\Pat\personal>
Upvotes: 2
Views: 3050
Reputation: 656
Type on CLI:
composer install
run this command first
composer dump-autoload
source and credits to: require(vendor/autoload.php): failed to open stream on Synchro comment
Upvotes: 1
Reputation: 10071
the vendor folder is missing so you got this error:
Warning: require(C:\Users\Pat\personal/vendor/autoload.php): failed to open stream: No such file or directory in C:\Users\Pat\personal\artisan on line 18
Run this command in your command prompt:
composer update --no-scripts
composer update
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.With this command, you will re-create the vendor folder in your project
Upvotes: 1
Reputation: 782
Check there might not vendor folder in your project root. So first run composer install command in the terminal. And it will generate the file that are missing.
Upvotes: 0