Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run most cordova commands without using sudo

I have installed npm to setup Ionic & Cordova - and I have used sudo for this?

My question is when I run the following command without sudo I get an error:

cordova emulate ios

The error is an

EACCES, permission denied ..... /ios.json

Am I right that if I cannot use this 'basic' cordova command without running sudo my installation has been screwed up somehow?

like image 860
Zabs Avatar asked May 13 '15 15:05

Zabs


1 Answers

I did the following on the terminal to allow me to run the commands without using sudo (this might help someone)

sudo chown -R $(whoami) ~/Documents/mobileapps

This meant the cordova emulate ios command now runs! finally!

like image 143
Zabs Avatar answered Sep 17 '22 00:09

Zabs