Some students have encountered difficulties when using the code . command to open Visual Studio Code via the command line. When attempting to execute the command, they receive the following error message:
Paulines-MacBook-Pro:next-js-portfolio-web paulineerika$ code .
-bash: code: command not found
Add a simple step to set up the Shell Command in VS Code in all System Setup guides
Steps to fix this issue:
Start by opening Visual Studio Code
ctrl/cmd-shift-P to open the Command Palette within Visual Studio Code
In the Command Palette, type shell command to search for the Shell Command: Install 'code' command in PATH option
Select the Shell Command: Install 'code' command in PATH option by clicking on it or pressing Enter
Some students have encountered difficulties when using the
code .
command to open Visual Studio Code via the command line. When attempting to execute the command, they receive the following error message:Add a simple step to set up the Shell Command in VS Code in all System Setup guides
Steps to fix this issue:
ctrl/cmd-shift-P
to open the Command Palette within Visual Studio Codeshell command
to search for theShell Command: Install 'code' command in PATH option
Shell Command: Install 'code' command in PATH option
by clicking on it or pressingEnter