Im installing ionic for the first time today, and getting this error when I try to launch the ios emulator…
Error: ios-sim was not found. Please download, build and install version 3.0 or greater from
https://github.com/phonegap/ios-sim into your path. Or 'npm install -g ios-sim' using node.js:
http://nodejs.org/
Error: /Users/akim/Desktop/ak/myapp/platforms/ios/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
So If I try to install ios-sim by doing sudo npm install ios-sim -g, i get this error.
npm ERR! tar.unpack untar error /Users/akim/.npm/ios-sim/3.1.1/package.tgz
npm ERR! Darwin 14.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "ios-sim" "-g"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! path /usr/local/lib/node_modules/ios-sim
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/ios-sim'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/ios-sim']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/ios-sim',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/ios-sim',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:99:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/akim/Desktop/ak/myapp/npm-debug.log
any thoughts?
I’m running yosemite.