简体   繁体   中英

Laravel 5.2 - Error while installing laravel using composer with git bash

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

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

运行composer dump-autoload将解决此错误。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM