node-libnmap
node-libnmap copied to clipboard
Error: Error: spawn nmap ENOENT
I'm trying to get all the devices connected on the network but I'm having this error.
Trace: Error: Error: spawn nmap ENOENT
at process.<anonymous> (D:\Projet\@DeviceHub\node_modules\libnmap\lib\libnmap.js:116:17)
at process.emit (events.js:223:5)
at process._fatalException (internal/process/execution.js:150:25)
at process.<anonymous> (D:\Projet\@DeviceHub\node_modules\libnmap\lib\libnmap.js:116:11)
at process.emit (events.js:223:5)
at process._fatalException (internal/process/execution.js:150:25)
Main.js
var opts = {
range : [
"***.***.*.0",
"***.***.*.225",
],
}
nmap.scan(opts, function(err, report) {
for (let item in report) {
console.log(JSON.stringify(report[item]));
}
});
Me too.. same error..
If you haven't set the nmap binary path, you need to set the environment variable in windows.