Marco Dinatsoli
Marco Dinatsoli

Reputation: 10570

Can't create a new project in Laravel

I installed the composer on my mac os and install laravel and added it to the path

so now printing the path you can see

 sudo nano /etc/paths

the result is:

/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myname/.composer/vendor/bin/laravel

so laravel is there, however, when I do:

laravel new blog

I got this error:

-bash: laravel: command not found

Upvotes: 1

Views: 1051

Answers (1)

A.L
A.L

Reputation: 10483

the result is:

/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myname/.composer/vendor/bin/laravel

(emphasize mine)

See how most of the paths end with bin, but not the one with laravel.

You have to provide the path of the directory which contain the laravel command, your $PATH should be:

/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myname/.composer/vendor/bin/

Upvotes: 1

Related Questions