Yesterday I updated my windows from version 1803 to 1903. Today I tried to continue work on my laravel application and tried to run PHP artisan serve for development.
What I got was an error message:
PHP Warning: require(C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php): failed to open stream: No such file or directory in artisan on line 18
Warning: require(C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php): failed to open stream: No such file or directory in artisan on line 18
PHP Fatal error: require(): Failed opening required 'C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in artisan on line 18
Fatal error: require(): Failed opening required 'C:\Users\MY_USERNAME\MY_PROJECT/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in artisan on line 18
But those files exist. I did not change anything after updating to windows 1903.
Its because you haven't installed Composer dependencies so
Cd To your project and run composer install in your terminal
I had this same problem because of the Windows update and I couldn't do composer install in my original project because it didnt find the composer.json, so... I pushed it on Github, downloaded and then made composer install on the new project and it works. Maybe it's not the best solution... but worked for me
Related
I have a project that I need to upgrade Laravel version. I did not write this project myself. Now when I type php artisan --version to find out the Laravel version of the project, I get the following error.
PHP Warning: require(C:\Users\USER\Desktop\omnicourse_creator_panel-main/vendor/autoload.php): failed to open stream: No such file or directory in C:\Users\USER\Desktop\omnicourse_creator_panel-main\artisan on line 18
PHP Fatal error: require(): Failed opening required 'C:\Users\USER\Desktop\omnicourse_creator_panel-main/vendor/autoload.php' (include_path='.;C:\php\pear') in C:\Users\USER\Desktop\omnicourse_creator_panel-main\artisan on line 18
Do you know why I am getting this error?
use the command 'composer update --ignore-platform-reqs' to update all the packages regardless of the differences in their versions.
I'm new to Laravel and I'm trying to install Laravel version 5.2. But it throws this error while installation. But if I install the latest version It works fine. I also tried updating to the latest version of PHP but still the same error. I'm using this to create a project composer create-project laravel/laravel onetone 5.2
Warning: require(C:\xampp\htdocs\onetone\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\onetone\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\onetone\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\onetone\bootstrap\autoload.php on line 17
PHP Warning: require(C:\xampp\htdocs\onetone\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\onetone\bootstrap\autoload.php on line 17
PHP Fatal error: require(): Failed opening required 'C:\xampp\htdocs\onetone\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\onetone\bootstrap\autoload.php on line 17
Script php artisan clear-compiled handling the pre-update-cmd event returned with error code 255
Please use the following command:
You need to use the --prefer-dist flag and wrap version number in a quotation.
composer create-project --prefer-dist laravel/laravel onetone "5.2.*"
php version for laravel 5.2 is between 5.5.9 - 7.1.*. so make sure that u have right php version in your computer
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>
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
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
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.
I need to make a CRUD application with laravel, and i installed it just like how it is supposed too but now i get this error. I am just checking what version of laravel i have installed but somehow this shows up? i am no expert on any means. Can someone help.
C:\Users\Gebruiker\blog>php artisan --version PHP Warning:
require(C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17
Warning:
require(C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17 PHP Fatal
error: require(): Failed opening required
'C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php'
(include_path='C:\xampp\php\PEAR') in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required
'C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php'
(include_path='C:\xampp\php\PEAR') in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17
When you first create a laravel project, there's a folder called vendor that laravel needs. Laravel the framework itself exists there among other folders there. There is a file named autoload.php that is vendor folder that loads all the packages that laravel uses. For you to get these packages, you'll run this command below
composer install
then laravel can now work, so can php artisan command too.
you have to update your wamp server, the php version has to be at least 5.7
When starting any new Laravel project make sure you run composer install
I have successfully installed Yii2 using composer on windows 8.1. I am using Xampp server but I am not able to run my project successfully.
I am getting this error:
Warning: require(C:\xampp\htdocs\application\web/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\application\web\index.php on line 7
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\application\web/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\application\web\index.php on line 7
I have also given proper permissions and set the cookie validation key but nothing is working.
Thanks for help.
Error is self explainable. There is no autoload.php file in vendor folder. It's generated after all vendor packages will be installed.
Use composer install command to install all packages.