SupabaseS
Supabase2w ago
Lara

Issue with Deno Edge Functions: InvalidWorkerCreation when importing external modules

Description:
I'm encountering an InvalidWorkerCreation error when trying to use Deno Edge Functions with external module imports. The error occurs specifically when importing files from outside the /supabase/functions directory.

Error Message:
Code : 503
{"code":"BOOT_ERROR","message":"Worker failed to boot (please check logs)"}


Environment:
  • OS: macOS
  • Framework: Deno
  • Supabase CLI Version: 2.65.5
  • @supabase/supabase-js: ^2.87.0
  • Deno Version: 256
Steps to Reproduce:
  1. Create a Supabase Edge Function that imports a module from outside the /supabase/functions directory.
  2. Attempt to serve the function locally using supabase functions serve.
Expected Behavior:
The function should start without any issues, allowing imports from outside the /supabase/functions directory.

Additional Context:
I've tried updating the deno.json configuration to use both npm and direct Deno imports, but the issue persists. The function works fine when run directly with deno run.

Relevant Files:
  • deno.json configuration
  • Any relevant code snippets showing the import statements
Question:
How can I properly configure my Supabase Edge Function to allow imports from outside the /supabase/functions directory? Are there any specific Deno permissions or configurations I need to set?
Was this page helpful?