-
Notifications
You must be signed in to change notification settings - Fork 73
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
Error trying to use in a Cloudflare Worker #207
Comments
Hi @lolcoolkat thanks for the fix.
|
@lolcoolkat NodeJS does not support |
@BrunoQuaresma We use Axios in the browser and on our node backend. Have you considered using that? |
@eigilsagafos I think axios uses XMLHttpRequests right? |
Yeah... you are right. Was just looking at that. |
I know some packages build for different environments and allow you to require like |
Yeah, we are thinking on this solution as well but it adds some extra effort to define a common API interface that should work for these environments. Sounds strange to me a serverless environment does not support core NodeJS stuff. 🤔 |
Cool, that makes sense.
I think it is a nice suggestion. We will evaluate that. Thanks for the contribution @lolcoolkat |
Is there any reason |
@lolcoolkat yes it is! We just need to add some tests and an extra environment in our pipeline to check things on V8 environments. Thanks for the suggestion. |
Fixes on https://www.npmjs.com/package/faunadb/v/2.11.2-beta. We are releasing this soon on the main version. |
just a small note. Cloudflare doesn't implement AbortController which we need to terminate requests as well as streams. so it better to pass customized fetch. for example:
|
this one actually works :O) previous solution fetch.bind(globalThis) Isn't work with fauna v4.x.x |
I'm seeing the following error while trying to use the driver in a Cloudflare Worker:
This is making it impossible to use Fauna from Cloudflare Workers, unless there's some workaround that I haven't yet considered.
@aequasi Sounds like you're using Workers, are you seeing this issue?
Note: Originally opened this issue on the closed #182 but then realized it's likely best to create a new issue for it.
The text was updated successfully, but these errors were encountered: