TooTallNate/node-bindings

Dynamic loading not supported on Alpine Linux

bajacondor opened this issue · 1 comments

Hello,
I'm getting this error:

runway/node_modules/bindings/bindings.js:83
        throw e
        ^

Error: Dynamic loading not supported
    at Error (native)
    at Object.Module._extensions..node (module.js:568:18)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at bindings (/opt/nord/runway/node_modules/bindings/bindings.js:76:44)
    at Object. (/opt/nord/runway/node_modules/ursa/lib/ursa.js:18:37)
    at Module._compile (module.js:541:32)

When running the following code on an Alpine Linux docker base image:

var ursa = require('ursa');
var fs = require('fs');
var crypt=fs.readFileSync('keyfile.pem', 'utf8');
var out = ursa.createPrivateKey(crypt, 'XXXXXX', 'utf8')
console.log(out.toPrivatePem('utf8'));

Ursa is a package that uses a .cc addon that's handled with node-bindings

Any insights?
Thank you!

This can be closed. My problem was that node had been built with the --fully-static config flag which disables dynamic loading of libs.

Thank you for your great work on node.js!