Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-sass/build'
On Reply :-
Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-sass/build'
Ask Question
Solution :-
You need to change ownership of node_modules
, because you use sudo npm install -g node-sass
so its ownership set to root,
To change ownership to current user as group -
sudo chown -R root:YOUR_USERNAME /usr/local/lib/node_modules/
sudo chmod -R 775 /usr/local/lib/node_modules/
And never use sudo
for npm
related query.
Try this
sudo npm install -g --unsafe-perm node-sass
Or this
sudo npm install -g --unsafe-perm --verbose @angular/cli
Run this command
sudo npm install -g <ModuleName> --unsafe-perm=true --allow-root