ENOENT error is due to the unavailability of required command in the PATH environment variable directories.
root@darshanams:~/Downloads/NodeFuzz-0.1.1# nodejs nodefuzz.js
Loading linux-configuration.
No module folder given. Defaulting to ./modules/ from config.js
Found property init() from module ./modules//DemoCanvasModule.js
You could have some inits in DemoCanvasModule.js and it would be executed now.
Successfully required module DemoCanvasModule.js
Found property init() from module ./modules//DemoMinModule.js
Successfully required module DemoMinModule.js
Will not handle directories in module-dir. Skipping ./modules//Helpers
We have 2 modules available.
Server listening port 8080
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1000:11)
at Process.ChildProcess._handle.onexit (child_process.js:791:34)
Search for spawn or child_process.spawn in our NodeFuzz or Applications source code which should be of the form
spawn(command, args)
in my case it was
browser = spawn(config.launch_command, config.browser_args)
Add below lines on top of spawn
console.log( process.env.PATH );
console.log( config.launch_command );
which prints PATH environment variable values and command being used.
This is the output on my console
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
google-chrome
So the issue is with command "google-chrome", node is unable to find or execute the command. Instead of throwing the exception to stdout lets handle the exception.
browser = spawn(config.launch_command, config.browser_args)
browser.on('error', function (err) {
console.log('config.launch_command error', err);
});
I am not a Java programmer, stuck with this error for 2 days. Googling also showns that this is a frequent error without a solution.
To fix similar issues read
http://stackoverflow.com/questions/27688804/how-do-i-debug-error-spawn-enoent-on-node-js
Hope, this helps someone somehwhere :-)
ReplyDeleteI am very happy to visit your wonderful blog, I appreciate your great effort. Thank you for your sharing and I want more posts...
Excel Training in Chennai
Advanced Excel Training in Chennai
corporate training in chennai
Tableau Training in Chennai
Pega Training in Chennai
Spark Training in Chennai
Embedded System Course Chennai
Linux Training in Chennai
Excel Training in Chennai
Advanced Excel Training in Chennai
Wonderful post and more informative!keep sharing Like this!
ReplyDeleteSoftware Testing Training in Chennai
Software Testing Course in Bangalore
Software Testing Training in Coimbatore
Software Testing Course in Madurai
Best Software Testing Institute in Bangalore
Software Testing Training in Bangalore
Software Testing Training Institute in Bangalore
Tally Course in Bangalore