javascript - requiring child process is coming as empty -
when use
var childprocess = require('child_process');
its coming blank.when
var childprocess1 = require('child_process').spawn;
its undefined , ,
var childprocess2 = require('child_process').spawn();
is giving not have spawn function.
node version v0.12.7
your child process has nothing execute, hence blank. guess trying
var exec = require('child_process').exec; //i'm checking node version installed, can own process here exec('node -v', function(error, stdout, stderr) { console.log('stdout: ' + stdout); console.log('stderr: ' + stderr); if (error !== null) { console.log('exec error: ' + error); } });
Comments
Post a Comment