Couchbase 2.0.0 "no suitable image found" Error

I was using Couchbase nodejs module version 2.0.0-beta4 for some time already, and today I wanted to switch to the latest version which is 2.0.0.

After installing the 2.0.0 version I don’t seem to be able to run my application anymore, I’ve tried to find the source of problem, so I tested with a file where I only wrote the require function like:

var couchbase = require("couchbase");

Still this file doesn’t run and I got the following error:

[ERROR] 11:23:53 Error Error: > dlopen(/PATH/TO/NODEJS/PROJECT/node_modules/couchbase/prebuilt/win/x64/couchbase_impl.node, 1): no suitable image found. Did find:

/PATH/TO/NODEJS/PROJECT/node_modules/couchbase/prebuilt/win/x64/couchbase_impl.node: unknown file type, first eight bytes: 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00
       at Object..node (/usr/local/lib/node_modules/node-dev/lib/hook.js:55:17)
       at Module.load (module.js:356:32)
       at Function.Module._load (module.js:312:12)
       at Module.require (module.js:364:17)
       at require (module.js:380:17)
       at bindings (/PATH/TO/NODEJS/PROJECT/node_modules/couchbase/node_modules/bindings/bindings.js:74:15)
       at tryLoadBinding (/PATH/TO/NODEJS/PROJECT/node_modules/couchbase/lib/binding.js:132:31)
       at Object.<anonymous> (/PATH/TO/NODEJS/PROJECT/node_modules/couchbase/lib/binding.js:150:17)
       at Module._compile (module.js:456:26)
       at Object.Module._extensions..js (module.js:474:10)

I am using MacOS X 10.9.5 and nodejs v0.10.32

Hey kouiti,

Looks like you might be missing the prerequisite build tools needed by node-gyp. You can find the relevant information here: https://github.com/TooTallNate/node-gyp/. Additionally, you may inspect your build-error.log file to see where the failure likely occurred.

Cheers, Brett

Hello brett19,

Thank you for your reply, I appreciate it a lot.

Well my problem is solved and it was pretty stupid of me, there didn’t seem anything wrong with node-gyp, but when I checked the log file you pointed me to, I’ve found something interesting, I needed to accept the xcode license agreement, since xcode has been updated recently.

Many, thanks and I hope this will help someone in future