Skip to content

"Argument list too long" error occurs when building a package with a large dependency set #132

@ixmatus

Description

@ixmatus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions