#3114·nvm

Support applying custom patches when building Node.js from source

Author: guterionCreated May 19, 2023Updated Aug 21, 2026
Labelsinstalling nodefeature requests

I'm using a Gentoo system with Clang/LLVM as the system toolchain and no GCC. Some older Node.js versions require small patches to build in this environment.

It would be useful if nvm provided a way to apply local patches when building Node.js from source, for example from a directory under $NVM_DIR:

$NVM_DIR/patches//*.patch

These could be applied after extracting the Node.js sources and before running the build.

This would also be useful for other systems where older Node.js releases need local compatibility fixes without having to modify nvm itself.