Open 5hee75 opened 1 year ago
@5hee75 Did you manage to resolve this? I have exactly the same problem with:
import { serve } from "https://deno.land/std@0.168.0/http/server.ts"
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2?target=deno&no-check';
The edge function works just fine, but I am not able to build my next app because of this.
@nalnir @5hee75 you can add supabase to the exclude section of tsconfig.json
"exclude": ["node_modules", "supabase"],
@5hee75 Did you manage to resolve this? I have exactly the same problem with:
import { serve } from "https://deno.land/std@0.168.0/http/server.ts" import { createClient } from 'https://esm.sh/@supabase/supabase-js@2?target=deno&no-check';
The edge function works just fine, but I am not able to build my next app because of this.
Are you using docker? Since CLI 1.120.0, you do need to install docker as a prerequisite for deploying functions.
Bug report
Describe the bug
Attempting to import
@supabase/supabase-js
type definitions throughesm.sh
, when included as a secondary package, fails with the following error:To Reproduce
This specific issue was found when trying to include the
@supabase/auth-helpers-shared
package viahttps://esm.sh/@supabase/auth-helpers-shared@0.3.0
in a Deno project (Edge Functions).The following repo should be able to reproduce the error.
https://github.com/astor-tech/supabase-edge-trpc
Note: Functionality seems ok when serving locally. The only issue is the type imports, so just the
supabase functions deploy
fails.Steps to reproduce
supabase functions deploy
Expected behavior
Type definitions should be available for the
@supabase/supabase-js
SDK through theesm.sh
module for Deno.https://esm.sh/v113/@supabase/supabase-js@2.12.1/dist/module/lib/types/dist/module/index.d.ts
Additional context
I was able to get the deployment to work functionally by using the auth helpers package from this CDN:
https://cdn.jsdelivr.net/npm/@supabase/auth-helpers-shared/+esm
However, that CDN doesn't seem to provide any useful type info, so using it with tRPC (my use case) becomes somewhat limiting.
(Split from https://github.com/supabase/supabase-js/issues/739)