0

After what seems like a successful global installation of the NestJS CLI by running npm i -g @nestjs/cli, I am unable to get zsh to recognize the nest command. It always throws zsh: command not found: nest. I am working on a Macbook Pro with Big Sur v 11.6 and node v14.17.6. Any ideas at all as to why I am unable to get the command working would be very much appreciated.

David__
  • 35
  • 6
  • Have you tried restarting your terminal? What's your `$PATH`` variable? Does it include the install location for npm global packages? – Jay McDoniel Sep 26 '21 at 17:36
  • I have made sure to restart my terminal. When I run `echo PATH` this is what is spit out: `/usr/local/opt/python@3.9/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin` – David__ Sep 26 '21 at 17:43
  • 1
    Looks like globally installed npm packages aren't in your path. [You can read through this SO post and answer for more info on the install path and how you can get it into your $PATH variable](https://stackoverflow.com/questions/5926672/where-does-npm-install-packages) – Jay McDoniel Sep 26 '21 at 17:53
  • Running `npm root -g` gives me `/Users/daviddelgadillo/.npm-global/lib/node_modules`. Is this what I need to add to my $PATH? – David__ Sep 26 '21 at 18:06

0 Answers0