How to Fix Install 'code' Path Command - EACCES: permission denied
On a new Mac, I was doing my usual setup, which involves setting up a shortcut to open a folder in VS Code by using the code
command in the terminal.
To install you need to open the command prompt by running:
cmd + shift + p
This will open the menu and you can search for commands by beginning to type.
If when you run the following command you get the "EACCES: permission denied" error:
Shell Command: Install 'code' command in PATH
You can fix it easily by running the uninstall command first.
The full command looks like this:
Shell Command: Uninstall 'code' command in PATH
This will ask for admin permissions and uninstall the PATH.
Then you can rerun:
Shell Command: Install 'code' command in PATH
Now you should have the shortcut installed! 🪄