'Use Supabase with deno
I'm trying to use Supabase with deno.
I used import { createClient } from "https://esm.sh/@supabase/supabase-js" but it only gives me errors like
Module '"deno:///missing_dependency.d.ts"' uses 'export =' and cannot be used with 'export *'
Solution 1:[1]
Solved: Used import { createClient } from "https://cdn.jsdelivr.net/npm/@supabase/supabase-js/+esm"
Solution 2:[2]
Using the Supabase Deno package works for me.
import { supabaseClient } from "https://deno.land/x/supabase_deno/mod.ts";
const sbclient = new supabaseClient("https://xyz.supabase.co","your-anon-key")
const sbTableItems = new supabaseTableItems(sbclient, "your-table");
const result = await sbTableItems.add(data);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Programmer Developement |
| Solution 2 | Maximilian Lindsey |
