Cannot run most cordova commands without using sudo

大憨熊 提交于 2019-12-07 03:33:46

问题


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?


回答1:


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!



来源:https://stackoverflow.com/questions/30219565/cannot-run-most-cordova-commands-without-using-sudo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!