node-libpq icon indicating copy to clipboard operation
node-libpq copied to clipboard

node cannot load app with libpq referenced

Open jayrosen1576 opened this issue 8 years ago • 3 comments

I have a very simple node script in index.js:

//var libpq = require('libpq');
console.log("hello");

uncommenting the libpq statement causes the following error when starting node:

o:\Projects\my-app\node_modules\bindings\bindings.js:83
        throw e
        ^

Error: The operating system cannot run %1.
\\?\o:\Projects\my-app\node_modules\libpq\build\Release\addon.no
de
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at bindings (o:\Projects\my-app\node_modules\bindings\bindin
gs.js:76:44)
    at Object.<anonymous> (o:\Projects\my-app3\node_modules\libpq
\index.js:1:108)
    at Module._compile (module.js:570:32)

I have tried a node-gyp rebuild, rebuilt the libpq solution manually in Visual Studio all to no avail. I have postgresql running so there's no problem there either. No idea where to go from here.

Btw, I'm on Windows 7 32-bit.

jayrosen1576 avatar Feb 20 '17 22:02 jayrosen1576

Probably the same problem here. @jayrosen1576 had you resolved this?

kolya-ay avatar Sep 14 '17 13:09 kolya-ay

nope. no feedback and no resolution.

jayrosen1576 avatar Sep 14 '17 13:09 jayrosen1576

Hmm sorry about that - I don't currently support windows so you're kinda on your own with resolving that one! If you find anything feel free to report back, open PR, whatever you'd like! Best of luck! Also: you can just use the JavaScript client...it's plenty fast and even faster in some situations.

brianc avatar Sep 14 '17 19:09 brianc