Closed ibc closed 5 years ago
This line is supposed to check if Node version === 12 (BTW it should be ">= 12"):
if (process.version.slice(1, 3) === '12') {
However, in Node 8:
> process.version.slice(1, 3) // => '8.' > process.version.slice(1, 3) > '12' // => true
So it fails. Better use this:
if (parseInt(process.version.slice(1, 3)) >= 12) {
Changed to if (typeof udpSocket.connect === 'function') {
if (typeof udpSocket.connect === 'function') {
This line is supposed to check if Node version === 12 (BTW it should be ">= 12"):
However, in Node 8:
So it fails. Better use this: