Closed Hazza88 closed 3 years ago
I get the error "ReferenceError: Image is not defined" when trying to start it, here is the code:
const Ping = require('ping.js'); var p = new Ping();
p.ping('https://github.com', function(err, data) { if (err) { console.log('error loading resource'); data = data + ' ' + err; } else { console.log(data); } });
Are you running this in Node.js by any chance?
Yea I am
Ah, yeah this module is for the browser.
I've updated the README to clarify.
I get the error "ReferenceError: Image is not defined" when trying to start it, here is the code:
const Ping = require('ping.js'); var p = new Ping();
p.ping('https://github.com', function(err, data) { if (err) { console.log('error loading resource'); data = data + ' ' + err; } else { console.log(data); } });