-
Notifications
You must be signed in to change notification settings - Fork 27
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
Missing performance.now()
implementation
#274
Comments
Thanks for nice reproduction. We have implemented performance now and it is available in nightly channel and will be fore unenv v2 / nitro v3 / nuxt v4. In the meantime i would suggest to manually add a polyfill to the apps. |
Unfortunately, I can't use
How can I add polyfill manually to mock the |
Which files are breaking your project? If minor, we might add it for backward compatibility so you can leverage v2.
Configure |
Ah this is from h3... unjs/h3#781 should fix in h3/nuxt nightly channel. Please let me know if other conflicts happening. |
Environment
Reproduction
Repo: https://github.com/farnabaz/unenv-performance-now
Demo: https://nuxt-ot.nuxt.dev
Describe the bug
Some packages like
@opentelemetry/core
importsperformance
directly fromperf_hooks
and thus this import handles by unenv in non-node environments. The issue is that performance polyfill is not yet implemented (or at leastperformance.now
is not implemented) and callingperformance.now()
return proxy function.As the result, we get this error
![Screenshot 2024-06-19 at 13 06 12](https://private-user-images.githubusercontent.com/2047945/341044459-4bb30fef-ec89-413e-83b7-b0838c10f0b6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTQ1MzQsIm5iZiI6MTczOTU5NDIzNCwicGF0aCI6Ii8yMDQ3OTQ1LzM0MTA0NDQ1OS00YmIzMGZlZi1lYzg5LTQxM2UtODNiNy1iMDgzOGMxMGYwYjYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMDQzNzE0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmVlMmJjMmVmNjJmMDIxODM1MjYxMThmMGRlZjU3NGEwOGMyMWYyNGZkMWYzOWJjODJlODlhOGEyYTU0NjgyNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.TeNGZwZxA84tVBF7TXSU8U04oOsooSqjFp12o6W2e18)
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: