Error: spawn ENOENT at errnoException (child_process.j2:980:11) when using Node.js child_process using non-root user -


i ran error using node.js v0.10.12 in macos , linux, piece of code work fine in windows 7. differences on windows 7 have admin id, on macosx , linux , not root , plan user.

do need root work child_process? clue why fails on os , not all? much,

this code:

var spawn = require('child_process').spawn;  try { var child = spawn('node', ['plusone.js']); //call every minute setinterval(function() { // var number = math.floor(math.random() * 10000); child.stdin.write(number +'\n'); child.stdout.once('data', function(data) { console.log('child replied '+ number +' ' +data);  });      },1500);                 child.stderr.on('data', function(data) {              process.stdout.write(data);               });             } catch (e)          {            console.log("entering catch block");           console.log(e);          } 

hi all: think got answer. reason why did not work on other os configuration.

if did not configure node on system path can accessible everywhere unless path specified.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -