Reputation: 3756
I am trying the Ionic framework.Everything ran smoothly but when I tried to emulate an iOS app
macbook$ sudo ionic emulate ios
I got the following error:
Password:
....
** BUILD SUCCEEDED **
No target specified for emulator. Deploying to iPhone-6 simulator
ENOENT, no such file or directory '/Users/macbook/Library/Logs/CoreSimulator/9F89ED64-0748-4A65-92DF-611110E9D4C4/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/macbook/Documents/workspaceionic/MyTestApp/platforms/ios/build/emulator/MyTestApp.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/macbook/Documents/workspaceionic/MyTestApp/platforms/ios/cordova/console.log,--stdout,/Users/macbook/Documents/workspaceionic/MyTestApp/platforms/ios/cordova/console.log,--exit
Error: /Users/macbook/Documents/workspaceionic/MyTestApp/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)
do you have any ideas about what could be wrong? I'm using Yosemite and Node version is 0.12.7. iOS apps from XCode emulate fine
EDIT: if I open the project with XCode and emulate it, it works.
Upvotes: 4
Views: 1152
Reputation: 71
It's a permission issue, it's resolve my problem,
sudo chown -R $(whoami) ~/Code/ionic-app/
Upvotes: 0
Reputation: 11
There are apparently issues with running Node 0.12.x and Ionic. I'm running into this issue, myself, in my c9.io account... the dev environ wants 0.12.x, but Ionic requires 0.10.x. See Anil Singh's response in this thread for more information: With Node 0.12.2 and npm 2.7.4 ionic installation error on windows 7
Upvotes: 1
Reputation: 33345
no need for sudo
ionic emulate iOS
is the correct statement
Upvotes: 1