Yohohodev

Error when running code . command in Terminal on macOS

#VSCode#Terminal

If you encounter the "code: command not found" error when running the code . command in the terminal:

  1. Check if your code editor is located in the Applications folder. If not, move it there.
  2. Add $PATH to the ~/.zshrc (or ~/.bash_profile) file and run source ~/.zshrc to restart the terminal.

You can obtain the path to code by using the command which code