Does anyone know how to statically compile nodejs to a single executable binary?
I means no share libraries needed.
There are some guides for old version nodejs, but not work for last one.
Actually, I want a single static binary to run on android platform.
And now , up to version 0.11.8, node.js officially add android support.
my colleague build it not only arm, but also android-x86. everything works fine!
You can use nodejs-static docker image to get statically compiled Node.JS binary linked with musl libc.
Meanwhile there is http://enclosejs.com/ which seems to be able to generate a single binary.
Here’s another one that can package your application in a single executable https://www.npmjs.com/package/pkg