3
votes

I am new to laravel, and while installing laravel using composer I am seeing an error. I tried finding the solution, but end up finding nothing. I also tried composer update. But still face issue while installing, below is the command.

COMMAND:

composer create-project --prefer-dist laravel/laravel cms 5.2

ERROR:

Fatal error: require(): Failed opening required 'C:\xampp\htdocs\cms\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\cms\bootstrap\autoload.php on line 17 PHP Warning: require(C:\xampp\htdocs\cms\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\cms\bootstrap\autoload.php on line 17 PHP Fatal error: require(): Failed opening required 'C:\xampp\htdocs\cms\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\cms\bootstrap\autoload.php on line 17 Script php artisan clear-compiled handling the pre-update-cmd event returned with error code 255

I have tried reinstalling composer and still the problem arise. Thanks in advance

2

2 Answers

3
votes

Try this:

composer create-project --prefer-dist laravel/laravel cms "5.2.*"

Note* If you already have a cms directory, delete it first before you run the above command.

Read more: https://laravel.com/docs/5.2/installation#installing-laravel

0
votes

Run composer dump-autoload will solve this error.