SupabaseS
Supabase3mo ago
Sanjan

Supabase edge functions and local imports

I'm struggling with figuring out the best way to deploy edge functions which take a dependency on classes or methods defined elsewhere in my repository. I see a lot of posts online around _shared folders, deno.json and import_map.

How do I use deno.json for a local import from another place in my repo? Do I need to modify the supabase function deploy <function_name> CLI command in any way?

The issue I'm running into now is something like -
unexpected deploy status 400: {"message":"failed to create the graph\n\nCaused by:\n    Module not found \"file:///tmp/user_fn_gmniqteyvuvjvhvaqbxi_7aea3757-1209-4749-8f2e-0af891505194_7/source/supabase/functions/_shared/baml_client/async_client\".\n        at file:///tmp/user_fn_gmniqteyvuvjvhvaqbxi_7aea3757-1209-4749-8f2e-0af891505194_7/source/supabase/functions/generate-feedback/index.ts:3:19"}
Was this page helpful?