AndreaNobili
AndreaNobili

Reputation: 42997

Why I obtain this error message when I try to create a new Laravel projct using Composer?

I am absolutly new in Composer and in Laravel framework.

I am trying to create a new Laravel 5.2 project using Composer to download it performing this statment in the GIT Bash shell:

composer create-project laravel/laravel cms 5.2

But I am obtaining the following error message:

$ composer create-project laravel/laravel cms 5.2
Installing laravel/laravel (v5.2.0)
  - Installing laravel/laravel (v5.2.0) Downloading: 100%
Created project in cms
> php -r "copy('.env.example', '.env');"
> php artisan clear-compiled

Warning: require(C:\xampp\htdocs\cms\bootstrap/../vendor/autoload.php): failed t
o open stream: No such file or directory in C:\xampp\htdocs\cms\bootstrap\autolo
ad.php on line 17

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): fai
led to open stream: No such file or directory in C:\xampp\htdocs\cms\bootstrap\a
utoload.php on line 17
PHP Fatal error:  require(): Failed opening required 'C:\xampp\htdocs\cms\bootst
rap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdoc
s\cms\bootstrap\autoload.php on line 17
Script php artisan clear-compiled handling the pre-update-cmd event returned wit
h error code 255

Why? What could be the problem? Something related Windows folder permission or what?

How can I try to fix this issue?

Upvotes: 0

Views: 213

Answers (2)

reza
reza

Reputation: 1507

you are having problem because your version value is not complete. you also have to put subversion or asteric(*) symbol

you have to use following command for achieve what you want

composer create-project laravel/laravel cms 5.2.*

Upvotes: 0

Rajender Joshi
Rajender Joshi

Reputation: 4205

It appears composer is trying to flush the compiled files which aren't created yet.

Step 1) Install Laravel without scripts

composer create-project --no-scripts laravel/laravel cms 5.2

Step 2) Run post install scripts manually.

cd cms    
composer run-script post-install-cmd

Upvotes: 1

Related Questions