简体   繁体   中英

Ionic 3.x : cordova run ios throws error ENOENT

Fist of all I'm using Ionic 3 on macOS Sierra.

I'm trying to test my app using cordova run iOS . If I do, I get the following error message:

** 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

The simulation loads, but the simulator is black. I googled this problem and found this https://github.com/ionic-team/ionic/issues/4052 but doing "sudo chown ..." doesn't help me. Any idea how to fix this error?

Thank you in advance :)

@suraj

You maybe need to remove platform and re-add. And not run the ionic / cordova command as sudo.

You should run as your user, eg

ionic cordova run ios ......

And not

sudo ionic cordova run ios .....

If you need to run as sudo, this cause the problem. Because run as sudo, it changes owner of folders and files to root.

To fix this problem, I first did to fix all execution permissions to my user, and not only for root / sudo.

I hope this helps you!

错误是我安装了一些使用sudo的东西,而其他东西则没有使用sudo,这导致了冲突。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM