赶知识网

How to fix Error: EACCES: permission denied, rmdir ‘build’

2021-03-18 / 1244次点击 Js/Css/jQuery

 

The access/permission error is a result of using sudo while installing packages using pm. Make sure you never use sudo for it.

 

So now, to fix the issue : The first thing you should check for when you see in this error is the directory location which is causing the permission issue. Usually it is one of the following :

 

/usr/local/lib/node_modules

/Users/your-username (your-username is your actual system username)

Now open your terminal and run the following command :

 

sudo chown -R $(whoami):staff /usr/local/lib/node_modules

 

and

 

sudo chown -R $(whoami):staff /Users/your-username

 

This command will change the directory owner to your user profile and then you won’t need sudo or root rights to access the folder.

有用 没用

Top10

沪ICP备09053415号 © 赶知识网