不使用sudo就无法运行大多数cordova命令 [英] Cannot run most cordova commands without using sudo

查看:159
本文介绍了不使用sudo就无法运行大多数cordova命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了npm来设置Ionic& amp;科尔多瓦 - 我为此使用了sudo?

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

我的问题是当我运行以下没有sudo的命令时出现错误:

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

cordova emulate ios

错误是一个

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

我是否正确,如果我不使用这个'基本'cordova命令而不运行sudo我的安装已被搞砸了?

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

推荐答案

我在终端上执行了以下操作,允许我在不使用sudo的情况下运行命令(这可能有助于某人)

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

这意味着现在可以运行cordova模拟ios命令!终于!

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

这篇关于不使用sudo就无法运行大多数cordova命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆