Skip to main content
Question

How to use Amplitude on Edge runtime

  • September 20, 2024
  • 1 reply
  • 136 views

I tried to use Amplitude Node SDK on Vercel Edge functions. However, I'm receiving this error:

Can't resolve 'http'

I'm assuming that Amplitude Node SDK might not be compatible with edge runtime. Is there a SDK compatible with the edge runtime?

1 reply

Same problem here - we are currently dropping down to raw HTTP requests [1] to solve this, but an edge-runtime-compatible SDK would be preferred.

 

Affects Vercel Edge, but presumably also stuff like Cloudflare workers, Deno Deploy, Fastly, etc

 

[1] https://amplitude.com/docs/apis/analytics/http-v2


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings