Issue with Deno Edge Functions: InvalidWorkerCreation when importing external modules
Description:
I'm encountering an
Error Message:
Environment:
The function should start without any issues, allowing imports from outside the
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
Relevant Files:
How can I properly configure my Supabase Edge Function to allow imports from outside the
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:
Environment:
- OS: macOS
- Framework: Deno
- Supabase CLI Version: 2.65.5
- @supabase/supabase-js: ^2.87.0
- Deno Version: 256
- Create a Supabase Edge Function that imports a module from outside the
/supabase/functionsdirectory. - Attempt to serve the function locally using
supabase functions serve.
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
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?