brianc / node-libpq

Simple, low level native bindings to PostgreSQL's libpq from node.js
112 stars 42 forks source link

node cannot load app with libpq referenced #50

Open jayrosen1576 opened 7 years ago

jayrosen1576 commented 7 years ago

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.

kolya-ay commented 7 years ago

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

jayrosen1576 commented 7 years ago

nope. no feedback and no resolution.

brianc commented 7 years ago

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.