Skip to content

Instantly share code, notes, and snippets.

@NKID00
Last active November 19, 2021 09:20
Show Gist options
  • Save NKID00/4d7a87065ae31b9ce436740efc47d229 to your computer and use it in GitHub Desktop.
Save NKID00/4d7a87065ae31b9ce436740efc47d229 to your computer and use it in GitHub Desktop.
fix `spawn E2BIG` in yarn in GNU/Linux.

To fix error An unexpected error occurred: "spawn E2BIG". when using yarn (a package manager for Node.js) in GNU/Linux, add the following:

opts.env.npm_package_noticeText = '';

before the following:

var proc = child.spawn(program, args, opts);

in function spawn(program, args) in ~/.nvm/versions/node/<node version>/lib/node_modules/yarn/lib/cli.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment