-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Axios is not supported on Edge Runtime #161
Comments
Any temporarily solutions to this? |
It would be a non-trivial amount of work to replace axios in typesense-js. So the workaround would be to use say |
It's worth exploring have an edge/deno supported js/ts library as many users are switching to such implementations for their backend. Related: |
You can just make |
I use pnpm aliases with redaxios In my
And I also have the following: function readPackage(pkg) {
if (pkg.dependencies && pkg.name === "typesense" && pkg.dependencies.axios) {
pkg.dependencies.axios = "npm:redaxios@^0.5.1";
}
return pkg;
}
module.exports = {
hooks: {
readPackage,
},
}; This setup works on Cloudflare Workers, not sure about other platforms. |
Could we bump the version of axios to the latest one? I think the latest version of axios has the |
I just tried this out on
|
@jasonbosco I think that's because |
Description
As described in this ticket, Axios is not supported (and I don't think it will in any time near future) and you cannot use this library on an Serverless edge functions for example like Vercel, AWS etc. (or any service worker like Cloudflare)
axios/axios#5523
https://vercel.com/guides/library-sdk-compatible-with-vercel-edge-runtime-and-functions#library-recommendations
Steps to reproduce
Expected Behavior
Actual Behavior
it... should work :D
Metadata
Typesense Version: 1.5.4
OS: Mac OS X
The text was updated successfully, but these errors were encountered: