Can’t Install Laravel Via Laravel New

I’ve been thinking about why can’t I use laravel new [folder] to create a new Laravel installation. It seemed to be frustrating me like a dragon firing fireball into the castle. Stop that too much. Enough.

So, the reason you landed on this page is because you got error message [GuzzleHttp\Exception\ClientException] Client error response [url] [status code] 404 [reason phrase] Not Found. I must be right! Why that annoying message tends to be appeared when you try to create new Laravel installation? It’s maybe the is not available anymore. So, what are we gonna do? It’s maybe something has to be updated but the Laravel developers seem not in the mood to talk about it.

Yeah I found the solution

I just remind you that it was very frustrating to install Composer and Laravel for the first time. To fix this situation you have to locate the installation directory for Composer. If you forgot, please recall your memory. Nope, this is my installation path.


Updating the Composer

Okay first, get into your composer installation path. Then, try to update by running php composer.phar update in your command line application, in this case I used the default Windows Command Prompt. If you get message like Warning: This development build of composer is over 30 days old. It is recommended to update it by running “composer.phar self-update” to get the latest version, you should run php composer.phar self-update instead the first one.

If it worked you’ll get a message like Updating to version 31eadc6920cd1866xxxxxx. Downloading: 100% Use composer self-update –rollback to return to version 1e27ffe22813df20xxxx

Updating the Laravel Installer

Still in that Composer installation path. Now run.

composer global require “laravel/installer=~1.1”

If you’re doing it correctly this message will fulfill your happy day.

Changed current directory to C:/Users/xxxxxxx/AppData/Roaming/Composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing laravel/installer (v1.1.2)
  - Installing laravel/installer (v1.1.3)
    Downloading: 100%

Writing lock file
Generating autoload files

Installing Laravel

NOW it’s time to kill the dragon. Execute this command my lovely soldier.

laravel new test

A folder with Laravel installation will be created in “test” folder if you did it right. I assume that you have added Composer installation path in your PATH environment. If you don’t know how to work it out you can read How to set the path and environment variables in Windows.

Leave a Reply