Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing ios-sim 1.9.0 fails at preinstall during rake build

My ios-sim broke recently after installing system updates, and I'm trying to re-install it. Currently, it's not installed in my directory. When running sudo npm install -g ios-sim, I receive this error.

$ sudo npm install -g ios-sim
npm http GET https://registry.npmjs.org/ios-sim
npm http 304 https://registry.npmjs.org/ios-sim
> [email protected] preinstall /usr/local/lib/node_modules/ios-sim
> rake build


events.js:72
    throw er; // Unhandled 'error' event
          ^
Error: Cannot find module './ios-sim' from '/usr/local/lib/node_modules/ios-sim'
at /usr/local/lib/node_modules/rake/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:36:25
at load (/usr/local/lib/node_modules/rake/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:54:43)
at /usr/local/lib/node_modules/rake/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:60:22
at /usr/local/lib/node_modules/rake/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:16:47
at Object.oncomplete (fs.js:107:15)
npm ERR! [email protected] preinstall: `rake build`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the ios-sim package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     rake build
npm ERR! You can get their info via:
npm ERR!     npm owner ls ios-sim
npm ERR! There is likely additional logging output above.

I've updated Node.JS to 1.4.3.

Does anyone know why this is happening and how I can fix it?

like image 784
Akshay Bajaj Avatar asked Feb 13 '23 12:02

Akshay Bajaj


2 Answers

on my system install using node.js(v0.10.8)

$ sudo npm install -g ios-sim

also failed..

however

$ git clone git://github.com/phonegap/ios-sim.git
$ cd ios-sim
$ sudo rake install prefix=/usr/local

worked fine..

like image 51
Wisu Suntoyo Avatar answered Feb 16 '23 03:02

Wisu Suntoyo


You just need to set your developer active directory:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Then you can install ios-sim as you would normally do: npm install ios-sim -g.

like image 32
AJ Meyghani Avatar answered Feb 16 '23 01:02

AJ Meyghani