node-pg-native icon indicating copy to clipboard operation
node-pg-native copied to clipboard

Bindings: undefined symbol

Open pito-svk opened this issue 8 years ago • 4 comments

my@account:~/my/project$ node
> var pg = require('pg').native;
Error: /home/my/project/api/node_modules/libpq/build/Release/addon.node: undefined symbol: node_module_register
    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 (/home/my/project/api/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/home/my/project/api/node_modules/libpq/index.js:1:108)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

pito-svk avatar Feb 27 '16 00:02 pito-svk

I've also encountered this issue

itamarwe avatar Aug 04 '16 09:08 itamarwe

you might want to try deleting and re-installing your node_modules folder

On Thu, Aug 4, 2016 at 4:12 AM, Itamar Weiss [email protected] wrote:

I've also encountered this issue

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brianc/node-pg-native/issues/40#issuecomment-237497813, or mute the thread https://github.com/notifications/unsubscribe-auth/AADDoWZ1TmNumall38CFKPawm61IirPUks5qca0WgaJpZM4HkTBR .

brianc avatar Aug 04 '16 15:08 brianc

The problem was I was using coffee script, and while I updated my node.js, my global coffee-script installation kicked in. To solve this, I ran:

npm update -g

itamarwe avatar Aug 07 '16 05:08 itamarwe

deleting node_modules helped

techsin avatar Mar 05 '21 21:03 techsin