node-XMLHttpRequest icon indicating copy to clipboard operation
node-XMLHttpRequest copied to clipboard

Spwan ENAMETOOLONG

Open gwang74 opened this issue 6 years ago • 1 comments

XMLHttpRequest throws an error 'Spawn ENAMETOOLONG' run with windows 10 while send a long string data.

var syncProc = spawn(process.argv[0], ["-e", execString]);

i think it cause by CMD arguments length limit in windows. i try to use like this

fs.writeFileSync(execFile, execString, "utf8");
var syncProc = spawn(process.argv[0], [execFile]);

is successfully run.

So could you support running with long string data in Windows?

gwang74 avatar Jul 29 '19 01:07 gwang74

I have this same issue can we use something like "cross-spawn"

here for example: https://github.com/driverdan/node-XMLHttpRequest/blob/master/lib/XMLHttpRequest.js#L15

Nvillaluenga avatar Feb 02 '24 04:02 Nvillaluenga