Closed muezz closed 7 months ago
@muezz I think if you use esm.sh's axios
you need to also import the xhr
as a polyfill. Try adding this import to the top of your function's source file.
import "https://deno.land/x/xhr@0.1.0/mod.ts";
You can try directly importing axios from npm: ie. import axios from "npm:axios@1.6.7"
That should work without needing any polyfills.
@laktek I actually ended up removing axios
as a dependancy as I was in a hurry to deploy the functions. I will try it out when I need to use axios
again.
If this is indeed not a bug and something that you have to do (I mean importing xhr
), let me know and I will close this ticket.
yeah, our recommendation would be to use npm:axios
if you need to use it.
I will close this issue since there's no fix needed from our end.
Describe the bug I upgraded Supabase CLI on my machine to the latest version and it does not allow me to deploy my edge function. This goes away if I remove
axios
as a dependancy.To Reproduce Steps to reproduce the behavior:
axios
fromhttps://esm.sh/axios@1.6.7
. I use import map but I doubt that has an effect here.supabase functions deploy my-func --no-verify-jwt
Expected behavior The edge function should deploy without any errors which it does if I remove the
axios
dependancy.System information Rerun the failing command with
--create-ticket
flag.