i'm trying to use this speedtest library with React Native to build a mobile app. I specifically want to find the upload and download speed from a certain server and I know that with this library you can do so by inserting the server's id. However, when I try to integrate this into React Native, I can't seem to call the speedTest method and get a TypeError:
I had to do a workaround to import the node module in React Native which works perfectly. I don't get an error when I do require, but right when I call the speedTest is when I get the above error. Does anyone have any thoughts or two cents with this issue?
i'm trying to use this speedtest library with React Native to build a mobile app. I specifically want to find the upload and download speed from a certain server and I know that with this library you can do so by inserting the server's id. However, when I try to integrate this into React Native, I can't seem to call the speedTest method and get a TypeError:
Here is how my two lines of code looks like:
const speedTest = require('./speedtest');
const test = speedTest({maxTime: 5000, serverId : "7334"});
I had to do a workaround to import the node module in React Native which works perfectly. I don't get an error when I do
require
, but right when I call the speedTest is when I get the above error. Does anyone have any thoughts or two cents with this issue?