Skip to content
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

any idea if this will work on cloudflare workers? #3

Open
newbeelearn opened this issue Jul 26, 2023 · 3 comments
Open

any idea if this will work on cloudflare workers? #3

newbeelearn opened this issue Jul 26, 2023 · 3 comments

Comments

@newbeelearn
Copy link

cloudflare workers are not exactly compatible with nodejs they need special compatibilty flag to emulate nodejs. For instance process may not be available in runtime. Would this library work on it?

@zensh
Copy link
Member

zensh commented Jul 27, 2023

The problem is "Uncaught Error: Some functionality, such as asynchronous I/O, timeouts, and generating random
values, can only be performed while handling a request." on crypto.getRandomValues.

@zensh
Copy link
Member

zensh commented Jul 27, 2023

Xid relies on global state and may need to be implemented with durable objects.

https://developers.cloudflare.com/workers/configuration/durable-objects/

@newbeelearn
Copy link
Author

i see thanks for the confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants