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
.