Is there a way the code can check if the modules are enabled or not?

Even with modules disabled it tries to connect (and fail to the device)
Error: ERROR (server_error) Server error on 192.168.1.75:60128 - Error: connect EHOSTUNREACH 192.168.1.75:60128
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14) {
errno: 'EHOSTUNREACH',
code: 'EHOSTUNREACH',
syscall: 'connect',
address: '192.168.1.75',
port: 60128
}