I am running:
composer create-project laravel/laravel:^9.* AppNameHere
the console looks like finish successfully but there is not folder/directory created in the selected location, why?
I have re-installed multiples times composer, update it and so on, I verified the variables of the system as well, everything look fine to me but I cannot install any new project.
I ran: composer create-project laravel/laravel:^9.* AppNameHere
I was expenting to see a new folder with the Laravel9.* project in the location.
console "finish succefully" but there is not project created, the folder is missing.
2
Answers
composer create-project laravel/laravel:9.5.0 AppNameHere
to create a project using Laravel 9.5.0.When I run
composer create-project laravel/laravel:^9.* AppNameHere
it literally getCould not parse version constraint ^9.*: Invalid version string "^9.*"
(see attached image for more info):You can even try a "semver simulator" and you can see it does not match anything, unless you change
^9.*
to9.*
(remove^
).And most important, if you read the composer documentation (Versions and constraints), you can see that
^9.*
is not valid, but9.*
is…Run the command as
composer create-project laravel/laravel:^9 AppNameHere
because^9
means9.0.0 <= Laravel version > 10.0.0
(it means it will look for a9.0.0
version to10.0.0
but not including10.0.0
(latest9.9.9.9.9
whatever is going to be chosen)).You are saying exactly that: download a version that is between 9.x but not 10.x+ =>
^9.0
or^9
. You can also use9.*
(no^
) and it will mean: download any version that is9.x.x
, but always prefer^9
instead of*
.