WSL and NPM: npm ERR! Error: EACCES: permission denied

Have you tried installing an NPM package and have been presented with errors similar to “npm ERR! Error: EACCES: permission denied”?
Chances are likely that you are using WSL (Windows Subsystem for Linux) and issuing commands from within VSCode terminal emulator.

Sadly, I will be unable to give you instructions on how to fix this. However, it seems to only occur whilst using the VSCode Terminal connected to a WSL.

To get around this, I have found that closing VSCode (all VSCode instances that are connected to the WSL) and issuing the command through the “app” terminal instead. You should now be able to install as normal!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.