I'm not overly impressed with Laracasts... "laravel new app" = -bash: laravel: command not found

Published 2 weeks ago by kvnkrft

I signed up yesterday and it's been a PAIN to get started. I started by watching the Laravel 5.4 From Scratch series. The instructor is nice, but he doesn't explain his setup. He has a directory called "code" I believe, but I didn't... anyhow.

I was able to run "laravel new blog" and it created everything. Then I installed mysql using brew and now "laravel" returns: -bash: laravel: command not found

This is all very very confusing (to me).

Best Answer (As Selected By kvnkrft)

Also, try running source on the .bashrc file.


He has a directory called "code" I believe, but I didn't... anyhow.

You don't need a directory named code. It's just a folder name. Create it, if you wish.

"laravel" returns: -bash: laravel: command not found

Sounds like you didn't properly install the Laravel executable. We cover how in lesson one of that series: https://laracasts.com/series/laravel-from-scratch-2017/episodes/1?time=2:30


The fact that the installation of Laravel is difficult for you, doesn't mean that @JeffreyWay is not doing great work on the site. Once you start getting used to working in the web development industry, you'll come to really appreciate the work Jeffrey is doing here. Wish you all the best on this journey!!


I installed laravel and ran "laravel new blog" and it created everything. Than I worked through the "installing mysql" via brew and things stopped working.

And the "code" thing... in the second or third video we park or link into the directory...

Everything works, just not laravel new app

Kevins-MBP:~ kevin$ valet
Laravel Valet 2.0.5
Kevins-MBP:~ kevin$ composer
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
Composer version 1.5.2 2017-09-11 16:59:25
Kevins-MBP:~ kevin$ laravel
-bash: laravel: command not found
Kevins-MBP:~ kevin$ echo $PATH

@wilburpowery I never said the instructor was bad, I simply said I'm frustrated because I followed the steps and things stopped working. No need to get all bent out of shape. I'm sure Jeff is a great guy, I love his style, but there are some confusing things. -- as a business owner, who wants to grow a business, feedback is pretty important. -- And your reply doesn't really help solve my problem.


@kvnkrft You haven't added the Composer global vendor directory to your path. That's why, when you type laravel, it can't find the executable. I show you how here:


I recommend going through the video from scratch one more time. Every issue you're experiencing was covered in the video.


@JefferyWay Sounds good. I'll try again, just strange that everything was working and then it stopped working. Thanks a bunch.


I never said anything about you calling Jeff a "bad instructor". And about your problem, you clearly don't have Composer in your path.

➜  ~ echo $PATH

I did add, when I first watched the video...

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

to the ~/.bashrc file and it's still there.



try doing it something like this:

export PATH=$HOME/bin:/usr/local/bin:~/.composer/vendor/bin:$PATH

Also, try running source on the .bashrc file.


AWESOME... thanks @wilburpowery - running "source ~/.bashrc" got it all working again!!


Great! Glad to help out @kvnkrft

4 days ago (5,810 XP)

I was having that problem for almost 4 days and could not get a way to fix it!

Finally I realized I forgot to comment out. Make sure that you remove the hashtag "#" from the line:

'#If you come from bash you might have to change your $PATH. export PATH=$HOME/bin:/usr/local/bin:~/.composer/vendor/bin:$PATH

Please sign in or create an account to participate in this conversation.