-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
universal-speedtest in react native error #21
Comments
Hi, I admit I'm not able to say where the problem might be, but I did a quick Google search and got this result from Stack Overflow. Please try searching Google for a problem with perf_hooks in React. It looks like this is a fairly long-standing problem. Let me know if you've been able to fix the problem. Bye |
Thank you for your answer。 How can I get the latest version |
It's correct, it's the latest version |
According to your prompt, the problem has not been solved, |
As I say, it will probably be a problem with React native. Being you, I would try searching on Google to find out how to fix the error perf_hooks in React native and if you do not find any solution, I would try to write to some counseling center (such as Stack Overflow). Currently it seems that the problem is more with React native, unfortunately I have never worked with it and I am not able to say where the problem might be. If a Universal Speedtest modification is required, I have no problem with that, but at the moment the problem seems to be elsewhere. |
Hi, I think there were some difficulties with the implementation of the test from Fast.com. |
If your time permits, implement Fast.com Get information. That's great |
Okay, I'll try. I'm not sure exactly where the problem was, truth be told. |
Thank you. Good luck |
hi,Has the function been implemented? |
No, not yet. I'm away from home for an extended period of time. I will be coming back around 20.6.. And honestly, I feel like Fast.com test couldn't be implemented because of the way the test works. We'll see... |
Thanks, then I want to ask another question。 |
I use the Truth be told, I don't understand why this should cause you problems. This function should be directly part of Node.js, right? So I'm not sure about that, but I have that feeling. I can take a look. |
Wait. Now I notice that you write that React native is not based on Node.js. What does it work on? |
React Native is a JavaScript framework for writing real, natively rendering mobile applications for iOS and Android. It’s based on React, Facebook’s JavaScript library for building user interfaces, but instead of targeting the browser, it targets mobile platforms. |
@luckyyaxianzhi |
Hello, |
- usage of `Date.now()` instead of `performance.now()` (hopefully solves #21) - more economical code (optimized calls, etc.) - used better endpoint to get speedtest.net servers - other useful changes
Hi again, npm install --save github:karelkryda/universal-speedtest#build
|
I try to run it inside a web worker and I get the error when importing
|
@IchordeDionysos That's weird. I'm guessing it's also React Native, right? Have you tried version 3.0.0 as I wrote in the comment above? |
@karelkryda It, unfortunately, does not work ... Steps to reproduce:
{
"scripts": {
"start": "http-server ."
},
"dependencies": {
"universal-speedtest": "github:karelkryda/universal-speedtest#build"
},
"devDependencies": {
"http-server": "^14.1.1"
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Universal Speedtest</title>
</head>
<body>
<script src="node_modules/universal-speedtest/dist/index.js"></script>
</body>
</html>
The following error will be shown:
For example, a library like They do this using rollup: I really liked the design of the library when I saw it, would be cool if it would be available across platforms. |
is there a solution for this? |
Hey, guys, If anyone has worked with this tool and knows how to use it properly or if you have any other ideas, feel free to let me know 🙂 . Thanks for your patience and ideas |
Hi, guys, npm install --save universal-speedtest@next The new documentation can be found here: https://karel-kryda.gitbook.io/universal-speedtest/v/3 Could someone please test for me if the library is now compatible with React Native? Unfortunately, I have never worked with it and have not been able to get a test project up and running. I hope everything will work as expected 😉. |
Hi, it's still not working with the new version. |
@Marcuspo, Thank you for testing. I tried to make it compatible with the browsers too, but I couldn't find a solution. Thank you in advance |
still not working |
error: ERROR: Unable to resolve module perf_hooks from file '../node_modules/universal-speedtest/dist/Speedtest.js':perf_hooks could not be found within the project or in these directories: node_modules
Object.defineProperty(exports, "--esModule", { value:true });
exports.Speedtest = void 0;
const perf_hooks_1 = require("perf_hooks");
const path = require("path");
The text was updated successfully, but these errors were encountered: