使用nodejs执行二进制代码会引发错误

时间:2018-07-10 14:54:07

标签: node.js binary spawn

$parm

我想在下面的var path = "/home/" var child = require("child_process").spawn(path, ['./nameOfBinary ', arg1], { stdio: ['ipc'] //enable ipc channel } ); child.stderr.on("data", function (data) { console.log("Error occured while executing the jar: \n" + data.toString()); reject(data.toString); }); child.on('exit', code => { console.log('Jar executed successfully.'); resolve(); }); child.stdout.on('data', (data) => { console.log(data.toString()); }); 中运行二进制文件。但这会引发我无法调试的错误。 说path

https://nodejs.org/docs/latest/api/child_process.html#child_process_child_process_spawn_command_args_options

如何找到错误的根本原因?我想念什么?

0 个答案:

没有答案