Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: EACCES, permission denied Ionic Cordova IOS

Tags:

I keep getting the following errors:

Error: EACCES, permission denied '/Users/Anuraag/.cordova/lib/tmp' .  

Whenever I try to do cordova add platform ios for my cordova app. What is the issue please help!!

like image 367
anuraagy Avatar asked Sep 01 '14 03:09

anuraagy


1 Answers

The error you have received is from NPM (since the Cordova CLI is installed via NPM). This is a tricky issue where using NPM with sudo, and then not using sudo will result in weird permission issues.

If you followed the instructions on the Cordova documentation, it has you install Cordova using sudo. It then has you do this:

# To ensure permissions are correct, run this command on Mac or Linux, changing LOGIN to match your account name: $ sudo chown -R LOGIN /usr/local/lib/node_modules/cordova 

Did you do that step? If not try it. If that doesn't work, make sure the '/Users/Anuraag/.cordova/lib/tmp' directory can be accessed. Given that it is a local temporary directory, there is most likely no harm in giving it full read/write access with something like:

chmod -R 777 '/Users/Anuraag/.cordova/lib/tmp' 
like image 89
Jeremy Harris Avatar answered Sep 24 '22 09:09

Jeremy Harris