我正在尝试Ionic框架。但是一切顺利但是 当我试图模仿iOS应用程序时
macbook$ sudo ionic emulate ios
我收到以下错误:
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)
你对可能出现的问题有任何想法吗? 我使用Yosemite和Node版本是0.12.7。来自XCode的iOS应用程序模仿
修改 如果我用XCode打开项目并模拟它,它就可以了。
答案 0 :(得分:1)
不需要sudo
ionic emulate iOS
是正确的陈述
答案 1 :(得分:1)
运行Node 0.12.x和Ionic时显然存在问题。我自己,在我的c9.io帐户中遇到了这个问题...... dev environ想要0.12.x,但是Ionic需要0.10.x.有关详细信息,请参阅Anil Singh在此主题中的回复:With Node 0.12.2 and npm 2.7.4 ionic installation error on windows 7