I use the child process exec and I need to switch to child process spawn
This is working for me.
var child = child_process.exec("npm install express --save" options, function (error, stdout, stderr) {
.....
});
when I do the switch to spawn it doesnt work I got error
var child = child_process.spawn("npm install express --save" options);
Error: spawn npm ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
I try even with
var child = child_process.spawn("npm", ["install express --save"], options)
;
and it doesnt work for me, what can be the issue?