3

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 Answers 2

3

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

Sign up to request clarification or add additional context in comments.

Comments

0

Run composer dump-autoload will solve this error.

2 Comments

I did that, but still there is an error ** [RuntimeException] Could not scan for classes inside "database" which does not appear to be a file nor a folder**
Delete composer.lock file and run composer update again.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.