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:
- Check if your code editor is located in the Applications folder. If not, move it there.
- Add $PATH to the
~/.zshrc
(or~/.bash_profile
) file and runsource ~/.zshrc
to restart the terminal.
You can obtain the path to code
by using the command which code