Closed flevi29 closed 10 months ago
I think some of these docker images strip symbol names from their distributed binaries. So project like isolated-vm which can't use NAN can fail to load. What you can do is start from the plain alpine docker image and compile node yourself (it is really very easy to compile node, since they distribute most of their dependencies).
@laverdet Please reopen. Apparently it is not fixed.
Before providing more context with reproduction and whatnot I'd like to give the simple error, because I've spent way too much time on this already. I want to know whether there's any interest.
I am building a custom Node.js image for Directus on
node:20.11.0-alpine
, and withpnpm deploy
, which works with a ton of symbolic links, which could also cause issues here (although probably not this one). The build stage installs all the dependencies, but it's separate from the final stage which does not include these dependencies, my thinking is that they're build dependencies, not runtime ones. I tried having them on the same stage, it didn't help, but not on the stage where I build, because that would make my image very fat. Maybe I should try that too, however I wouldn't want my image to be almost a gigabyte. The following is the error I am getting when all is bundled andpnpm deploy
-ed:I've followed the README.md instructions for Alpine, and this still happens. Not sure why. If I'm building on
node:20.11.0-bookworm-slim
(Debian) it all works.