I want to open google chrome with nodejs, but I get this error (I used execFile and spawn),
code
var execFile = require('child_process').execFile,
spawn = require('child_process').spawn,
spawn('C\\Program Files\\Google\\Chrome\\Application\\chrome.exe', function (error, stdout, stderr) {
if (error !== null) { console.log('exec error: ' + error); }
});
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:998:11)
at Process.ChildProcess._handle.onexit (child_process.js:789:34)
:
in the file path. I think it should beC:\\Program Files\\Google\\Chrome\\Application\\chrome.exe
– Streetcar