Developers using Supabase Edge Functions can now resolve a confusing SDK incompatibility that causes task execution to fail. Because Supabase uses a Deno-based runtime, it lacks certain Node-style APIs. This causes the standard Trigger.dev SDK to throw a TypeError when attempting to trigger tasks.
The documentation now includes a dedicated troubleshooting section outlining a . Instead of relying on the SDK, developers are instructed to bypass it entirely by calling the REST API directly. This avoids loading the incompatible Node dependencies into the Deno environment.
Here is how to trigger a task directly via the API:
1const response = await fetch(2 `https://api.trigger.dev/api/v1/tasks/your-task-id/trigger`,3 {4 method: "POST",5 headers: {6 Authorization: `Bearer ${Deno.env.get("TRIGGER_SECRET_KEY")}`,7 "Content-Type": "application/json",8 },9 body: JSON.stringify({ payload: { your: "payload" } }),10 }11);