1

Sorry I'm new to developing and there's a lot of stuff that I don't really understand 100% yet. I'm trying to configure VSC but when I enter the following command into the terminal:

paulnewby@iMac ~ % npm install -g create-react-app

it throws up an error message:

zsh: command not found: npm.

I'm not sure what zsh is (Wikipedia's description is a little jargon heavy for a novice developer) but apparently Mac OS Catalina (which I am using) has it by default. I believe I have node / npm installed, but I may have done this incorrectly. Does anyone have any knowledge as to why this error is occurring/what zsh is/ how I can fix it? This would be much appreciated, thank you.

HeathenINedeN
  • 123
  • 1
  • 9

1 Answers1

1

zsh is short for "Z Shell", which is the default shell used by MacOS. To say it short: A shell is a program run by a terminal, to execute commands, manage command line history and much more.

When you say you already installed NPM, then your shell (zsh) does not know about that yet. You should check again if you correctly installed nodeJS and maybe check this answer to help zsh to recognize your NPM installation:

If you installed Node.js using Homebrew, npm binaries can be found in /usr/local/share/npm/bin. You should make sure this directory is in your PATH environment variable. So, in your ~/.zshrc file add export PATH=/usr/local/share/npm/bin:$PATH.

Björn Böing
  • 1,662
  • 15
  • 23