Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding error in Docker Alpine #28

Open
JbIPS opened this issue Apr 10, 2018 · 3 comments
Open

Binding error in Docker Alpine #28

JbIPS opened this issue Apr 10, 2018 · 3 comments

Comments

@JbIPS
Copy link

JbIPS commented Apr 10, 2018

Hello,

I'm using libxml through samlify and I have some problem when using my app in a Docker Alpine container (base on the official node one):

> [email protected] start /opt/app
> node -r make-promises-safe lib/index.js

/opt/app/node_modules/bindings/bindings.js:88
        throw e
        ^

Error: Error loading shared library xmljs.node: No such file or directory (needed by /opt/app/node_modules/libxml-xsd/build/Release/node-libxml-xsd.node)
    at Object.Module._extensions..node (module.js:689:18)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at bindings (/opt/app/node_modules/bindings/bindings.js:81:44)
    at Object.<anonymous> (/opt/app/node_modules/libxml-xsd/index.js:8:34)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)

I tried to build and rebuild with gyp, I checked the content of node_modules/libxmljs-mt/build/Release/, xmljs.node is there (in obj.target too) and it works perfectly outside of Docker.

Do you have any clues on why this happens once in a container?

Thank you

@albanm
Copy link
Owner

albanm commented Apr 10, 2018

Hello,

Unfortunately I don't have the time to actively maintain this project and I don't remember encountering this problem. However I accept pull requests, in case you find a fix...

Sorry about that.

@JbIPS
Copy link
Author

JbIPS commented Apr 11, 2018

Actually I took the issue to the node:alpine guys and it looks like the problem is with glibc/musl.

A solution was implemented by NodeSass here. Could you lead me to where I should operate some similar changes?

Thanks a lot

@albanm
Copy link
Owner

albanm commented Apr 12, 2018

It seems that the fix is in a part of the code whose tasks are delegated to https://github.com/TooTallNate/node-bindings in our case.

You could try updating this dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants