AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Supabase CLI Fails To Deploy Edge Functions With Subpath Imports In Deno.Json

Edge functions using subpath imports (e.g., 'hono/pretty-json') fail to deploy with error 'Relative import path not prefixed with / or ./ or ../' because the CLI does not pass deno.json as import map during bundling.

highConfidence 65%Supabase-CliStorageEdge FunctionsAffected V2.78.1

Origin Analysis

Supabase CLI does not pass the function's deno.json import map to the Deno bundler when deploying edge functions, causing subpath imports to be treated as relative paths.
1. Create edge function with import from subpath e.g. `import { prettyJSON } from 'hono/pretty-json'` 2. Add deno.json with `"hono/": "npm:/hono@^4.10.8/"` 3. Run `supabase functions deploy` 4. Observe error: Relative import path "hono/pretty-json" not prefixed with / or ./ or ../

Fixing Code Block

Edge Case Audit

This fix assumes deno.json is at the function root and correctly formatted. In concurrent deployments, each function may have a different deno.json, so the path must be resolved per function. Relative paths in import map entries may break if the working directory differs from the function directory; consider using absolute paths. Rollback: if the issue persists, revert to the --use-api flag, but note that static files will not be deployed.

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state