Solution :
I had also faced such issues. I think currently you are facing permission issues. I think you are trying to install the npm-packages
and getting the EACCES
error while trying to install the package globally. The error is suggesting that you do not have the required permission to write to required directories which npm
uses to store the global packages and commands.
To cross check try to run below commands:
sudo chmod u+x -R 775 ~/.npm
sudo chown $USER -R ~/.npm
If you want to install the npm-package
locally then in that case you should be in the local project directory and then you can try running below command
sudo npm install <pkg-name>
The above command will install the required package. Now the purpose of using the sudo
is to change the owner permissions so that you can make the current user authorized to run the npm
commands.