2017-08-02 83 views
1

我在MacOS Sierra上使用Ionic 3的所有拳头。Ionic 3.x:cordova run ios抛出错误ENOENT

我试图用cordova run iOS来测试我的应用程序。如果我这样做,我会收到以下错误消息:

** BUILD SUCCEEDED ** 

No target specified for emulator. Deploying to iPhone-SE, 10.3 simulator 
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=53): 
Error returned in reply: Connection interrupted 
Software caused connection abort 
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=53): 
Error returned in reply: Connection interrupted 
Software caused connection abort 
Error: ENOENT: no such file or directory, stat '/Users/jan/Library/Logs/CoreSimulator/C0954A6B-4791-448E-8D0A-9E875301BD8B/system.log 

模拟加载,但模拟器是黑色的。 我GOOGLE了这个问题,发现这https://github.com/ionic-team/ionic/issues/4052,但做“sudo chown ...”不帮助我。 任何想法如何解决这个错误?

预先感谢您:)

回答

0

错误是我安装了一些东西使用sudo和其他东西不使用sudo,导致冲突。

0

@suraj

您可能需要删除平台并重新添加。 而不是像sudo那样运行ionic/cordova命令。

您应该以您的用户身份运行,例如

离子科尔多瓦运行IOS ......

而且

须藤离子科尔多瓦运行IOS .....

如果您需要以sudo身份运行,这会导致问题。因为以sudo身份运行,它将文件夹和文件的所有者更改为root用户。

为了解决这个问题,我首先修复了所有执行权限给我的用户,而不仅仅是root/sudo。

我希望这可以帮助你!