I'm having an issue creating a Laravel 8 project. Before the release of Laravel 9, it was working normally. However, if I create a project using laravel new example-app
, it will create Laravel 9 projects. The following error appears when I use composer create-project-prefer-dist laravel/laravel:8.16.1 blog
. What can I do to solve this problem? I currently use Laravel version 8.0. Note I can't upload images of the errors because of reputation.
[InvalidArgumentException] Could not find package laravel/laravel with version 8.16.1.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [] [] []
CodePudding user response:
Laravel doesn't have version 8.16.1
. Maybe you mean version 8.6.11
.
You can use :
composer create-project --prefer-dist laravel/laravel:8.6.11 blog