diff --git a/misc/wasm/wasm_exec_node.js b/misc/wasm/wasm_exec_node.js index 9860690..3674930 100644 --- a/misc/wasm/wasm_exec_node.js +++ b/misc/wasm/wasm_exec_node.js @@ -22,7 +22,8 @@ require("./wasm_exec"); const go = new Go(); go.argv = process.argv.slice(2); -go.env = Object.assign({ TMPDIR: require("os").tmpdir() }, process.env); +// to prevent `total length of command line and environment variables exceeds limit` error, ignore env. +// go.env = Object.assign({ TMPDIR: require("os").tmpdir() }, process.env); go.exit = process.exit; WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => { process.on("exit", (code) => { // Node.js exits if no event handler is pending