2

I need to write a Supabase Edge Function that interacts with GetStream. But as Supabase Edge Functions are running via Deno, I am importing the package via JS Deliver as follows:

import { StreamChat } from "https://cdn.jsdelivr.net/npm/stream-chat";

When I am serving the Edge Function locally, via the

supabase functions serve test_chat --debug

I get the following error:

error: TS2305 [ERROR]: Module '"https://cdn.jsdelivr.net/npm/stream-chat.js"' has no exported member 'StreamChat'.

revealing that it does not try to fetch "stream-chat" but "stream-chat .js", which does not exist.

Has anyone already found a solution to this?

Many thanks in advance,

Bergi
  • 630,263
  • 148
  • 957
  • 1,375
boeledi
  • 6,837
  • 10
  • 32
  • 42

0 Answers0