Skip to content

[BUG] @voltagent/core fails in Supabase Edge Functions because Deno eagerly resolves @libsql/client native binary #1216

@onebillionthorg

Description

@onebillionthorg

Describe the bug

Summary

@voltagent/core cannot be used directly in Supabase Edge Functions via npm: imports because Deno eagerly resolves transitive dependencies, including @libsql/client, which then loads a native *.node binary requiring FFI.

This makes VoltAgent unusable in Supabase Edge Functions even when the app does not configure LibSQL memory at all.

Environment

  • Platform: Supabase Edge Functions
  • Runtime: Deno-based edge runtime
  • Import style: direct npm: imports
  • VoltAgent package: @voltagent/core
  • Tested on: April 22, 2026

Minimal repro

import { Agent } from "npm:@voltagent/core";

Deno.serve(() => {
  const agent = new Agent({
    name: "test",
    instructions: "Say hello",
    model: "openai/gpt-4o-mini",
  });

  return new Response("ok");
});

Steps To Reproduce

  1. Create a new Supabase Edge Function.

  2. Add a minimal VoltAgent import:

    import { Agent } from "npm:@voltagent/core@<VERSION>";
    
    Deno.serve(() => {
      const agent = new Agent({
        name: "test",
        instructions: "Say hello",
        model: "openai/gpt-4o-mini",
      });
    
      return new Response("ok");
    });
  3. Serve or deploy the function with Supabase Edge Functions.

  4. Observe that Deno eagerly resolves transitive dependencies from @voltagent/core, including @libsql/client.

  5. Resolution reaches a native *.node binary from the LibSQL stack, which requires FFI/native module loading and fails in the Supabase Edge runtime.

Expected behavior

Importing and using @voltagent/core in Supabase Edge Functions should work when LibSQL is not configured or used.

Unused native storage adapters should not block edge/serverless usage of the core package. If LibSQL is optional, it should only be loaded when explicitly imported/configured.

Packages

Tested package:

  • npm:@voltagent/core@<EXACT_VERSION_TESTED>

Not explicitly used in the repro:

  • @voltagent/libsql
  • @libsql/client

Runtime context:

  • Supabase Edge Functions
  • Deno-based edge runtime

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions