You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_LDFLAGS but we think a better solution would instead use something like passAsFile instead of exporting the environment variables.
The text was updated successfully, but these errors were encountered:
To be honest I’ve never used passAsFile and am not sure what would be needed to get that to work. Do you think you could make a PR? In any case it might be good to have a test case for this (although it might by necessity take a long time to run).
ixmatus
added a commit
to ixmatus/nixfromnpm
that referenced
this issue
May 18, 2018
I suspect this doesn't correctly fixadnelson#132 but I did want to open a PR
with our (Awake Security) temporary workaround so that anyone else
with this problem can find the temporary solution and so that we can
discuss whether this suffices or if we want to approach solving this
with the suggested `passAsFile` approach.
Credit for this workaround goes entirely to @intractable (Joel
Stanley).
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_PATH
andNIX_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 likepassAsFile
instead of exporting the environment variables.The text was updated successfully, but these errors were encountered: