Laravel 5 installer only creates an empty folder

I follow Laracasts: create your first laravel app - episode 2 . I also looked at Laravel 5 Docs . After installing the laravel installer, I run the "laravel new blog", but all he does is create an empty folder. Why is this?

My bash_profile file is reading

export PATH = / Applications / MAMP / bin / php / php5.5.10 / bin: $ PATH
export PATH = $ HOME / bin: $ PATH
export PATH = $ PATH: ~ / .composer / vendor / bin /
export PATH = $ PATH: ~ / .composer / vendor / bin
export PATH = "/ usr / local / bin: $ PATH"

+6
source share
2 answers

This is because it is trying to use the old laravel installer installed in / usr / local / bin.

You just need to remove this with:

sudo rm / usr / local / bin / laravel

And it all worked for me!

+4
source

I had the same problem. In my case (Debian 7.8)

First try calling the installer in its full path:

/home/_your_username_/.composer/vendor/bin/laravel new _your_projectname_ 

If it works like this, I think you have the $ PATH setting in the wrong order.
First I installed the laravel 4 installer in /usr/local/bin/laravel , following these instructions http://laravel.com/docs/4.1

Then I installed the new laravel 5 installer after the following instructions: http://laravel.com/docs/5.0

So the problem was that I used

 export PATH="$PATH:~/.composer/vendor/bin" 

to add binary to my $PATH , it was put at the end of the list, and the first installer was found first. Use

 export PATH="~/.composer/vendor/bin:$PATH" 

so it is added before /usr/local/bin/ Then it should work.

0
source

Source: https://habr.com/ru/post/983618/


All Articles