Upstream unsets only NODE_PATH:
... but not NIX_LDFLAGS.
With a large number of deps, these env vars (NODE_PATH and NIX_LDFLAGS) can grow quite large (>128k), such that leaving them exported and attempting to invoke shell commands can lead to misleading "Argument list too long" errors, which actually indicate that kernel-limited env space has been exceeded.
We patch nixfromnpm to unset NIX_LDFLAGS but we think a better solution would instead use something like passAsFile instead of exporting the environment variables.
Upstream unsets only
NODE_PATH:nixfromnpm/nix-libs/nodeLib/buildNodePackage.nix
Line 446 in b89beea
... but not
NIX_LDFLAGS.With a large number of deps, these env vars (
NODE_PATHandNIX_LDFLAGS) can grow quite large (>128k), such that leaving them exported and attempting to invoke shell commands can lead to misleading "Argument list too long" errors, which actually indicate that kernel-limited env space has been exceeded.We patch nixfromnpm to unset
NIX_LDFLAGSbut we think a better solution would instead use something likepassAsFileinstead of exporting the environment variables.