Dlopen being called on OS X on Node v0.10.28 (couchnode 1.2.4)

I used code below to test couchbase

var couchbase = require(‘couchbase’);
var db = new couchbase.Connection({
bucket: “default”

},
function(err) {
if (err) throw err;
db.set(‘testdoc1’, {
name: ‘Frank1’
}, function(err, result) {
if (err) throw err;
db.get(‘testdoc1’, function(err, result) {
if (err) throw err;
console.log(result.value);
// {name: Frank}
});
});
});

but it reports

/Users/mymac/node_modules/couchbase/lib/binding.js:17
throw e;
^
Error: dlopen(/Users/mymac/node_modules/couchbase/prebuilt/win/x64/couchbase_impl.node, 1): no suitable image found. Did find:
/Users/mymac/node_modules/couchbase/prebuilt/win/x64/couchbase_impl.node: unknown file type, first eight bytes: 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00
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 (/Users/mymac/node_modules/couchbase/node_modules/bindings/bindings.js:74:15)
at tryLoadBinding (/Users/mymac/node_modules/couchbase/lib/binding.js:13:31)
at Object. (/Users/mymacg/node_modules/couchbase/lib/binding.js:31:17)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)

it looks like

‘npm install couchbase’ installed the version(couchnode) for windows, I try several times, same result

How to force to install the version for osx?

Your comment welcome

is there anyone?

I tested on ubuntu and windows

all work well except osx

1 Like

Hi there, I’m experiencing the same issue, did you solve it?

Hey Guys,

Would you be able to take a look at your builderror.log? There should be more details in there. On Non-Windows platforms, if the build fails and the library is attempted to be loaded, it will fall back to the windows binaries, even on non-windows platforms. This is unfortunately a necessary evil of providing prebuilt binaries for windows. Your builderror log should hold the relevant details of why you build is failing.

Note that there are some notable prerequisites to building with node-gyp here:

Cheers, Brett