0

My main problem is that I am getting the error zsh: command not found $ when I run $ gulp serve. This is after installing a Yeoman webapp generator.

I've checked these other sources:

I'm not sure which one is most relevant to me. It seems like most of the issues people have are caused by the PATH being messed up. I also believe my issue is with my PATH. When I run echo $PATH, this is what I get:

echo $PATH
/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/thisisme/.rvm/gems/ruby-2.2.1/bin:/Users/thisisme/.rvm/gems/ruby-2.2.1@global/bin:/Users/thisisme/.rvm/rubies/ruby-2.2.1/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/X11/bin:/usr/local/mysql/bin:/Users/thisisme/.rvm/bin:/Users/thisisme/.rvm/gems/ruby-2.2.1/bin:/Users/thisisme/.rvm/gems/ruby-2.2.1@global/bin:/Users/thisisme/.rvm/rubies/ruby-2.2.1/bin:/usr/local/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/mysql/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/mysql/bin:/Users/thisisme/.rvm/bin:/Users/thisisme/.rvm/bin

When I look in my ~/.zshrc file, I get

export PATH=$PATH:"/Users/thisisme/.rvm/gems/ruby-2.2.1/bin:/Users/thisisme/.rvm/gems/ruby-2.2.1@global/bin:/Users/thisisme/.rvm/rubies/ruby-2.2.1/ 

and so on... (It goes on and on from there, but hopefully you get the idea.) One of these answers suggested using exec zsh -1; now I get

$ gulp serve
zsh: command not found: $
[1]    34254 exit 127   $ gulp serve

My user PATH looks kind of crazy. I have Python and Ruby installed because I installed Jekyll in the past but I don't use them often.

It's been a while since I used Terminal, but I wrote myself this note to use rvm reinstall 2.1.4. Unfortunately, I got an error Error: /usr/local/opt/makedepend not present or broken Please reinstall makedepend. Sorry :(. So, this is another problem that I am not sure is necessary to fix this problem. But I tried it, so I'm including it.

If anyone has tips on where to look or how to help, preferably some place with instructions with steps because I'm still learning, that would be very helpful.

Edit: The answer was that the generator did not install gulp when it built out the scaffolding for the webapp.

Community
  • 1
  • 1
user70848
  • 886
  • 1
  • 7
  • 19

1 Answers1

2

Dumb question maybe, but are you actually typing the $ in your shell? This would explain zsh: command not found $. Is it a typo or do you have an opening " at PATH=$PATH" and no closing "? I think you actually don't need "".

rav
  • 80
  • 6
  • Probably right, but this should be a comment on the main question instead of an answer. – chepner Apr 04 '17 at 20:30
  • 3
    I actually wanted to put that into a comment but i don't have the 50 reputation needed to add a comment – rav Apr 05 '17 at 08:50
  • Yes. I get the same error for any combination of the commands. – user70848 Apr 05 '17 at 14:08
  • 2
    What do you mean by yes? You type `$` into the shell? `$` isn't a command, you are not supposed to type that. When you read something like `$ man man` that means you are supposed to type `man man` into your terminal as normal user and `# vim /etc/fstab` means type `vim /etc/fstab` as root or with sudo prepended. And what do you mean by any combination of the command? – rav Apr 05 '17 at 14:19
  • I mean, I get the same error when I type $ gulp serve, gulp serve, serve. The error message is just tailored to what I type. If I type `$ gulp serve`, I get `zsh: command not found $`. If I type `gulp serve`, I get `zsh: command not found gulp`. Etc. I just didn't want to type it all out because I thought it was clear. – user70848 Apr 05 '17 at 17:29
  • 1
    What is the output of `which gulp` – rav Apr 05 '17 at 17:32
  • Ha! `gulp not found`. I guess maybe that's my problem. I thought it was installed after going through all this rigamarole with installing the webapp generator via Yeoman. But if that's the case, I guess I'll need to install it. However, I still think that maybe my PATH is wacky... – user70848 Apr 05 '17 at 17:37
  • 1
    But you have installed gulp? I'm not familiar with gulp. You'd have to look into this yourself, but i guess you want to type `gulp serve` because `$` isn't a command and i guess `serve` is a option for the `gulp` command – rav Apr 05 '17 at 17:41
  • 1
    You might want to look into something like https://travismaynard.com/writing/getting-started-with-gulp – rav Apr 05 '17 at 17:48
  • I will need to check the documentation, but my understanding was that using the generator would install everything it needed. I guess I didn't, so that explains it. Thanks. – user70848 Apr 05 '17 at 17:48
  • 1
    You can try finding gulp manually `find / -name "gulp" 2>/dev/null` p.s. `/` is the root directory in Linux, I'm not familiar with directory structure in Mac – rav Apr 05 '17 at 17:54