Supabase Edge "import map ... not found" in CI
Supabase Edge Functions resolve bare imports through a Deno import map. When the function is configured with an import_map path that does not exist on the runner, or a mapped specifier is wrong, the bundle fails to resolve dependencies.
What this error means
The deploy fails with "import map not found", "Failed to load import map", or a "Module not found" / "not prefixed" error for a bare specifier that the import map was supposed to resolve.
Error: Failed to load import map from "./supabase/functions/import_map.json":
No such file or directory (os error 2)Common causes
The import map path is wrong in CI
The configured import_map.json path is relative to a directory that differs in CI, or the file was not committed, so the CLI cannot read it.
A bare specifier with no map entry
The function imports a bare name that has no entry in the import map, so Deno cannot resolve it even when the map loads.
How to fix it
Point at a committed import map
- Confirm import_map.json is committed and at the expected path.
- Pass the import map explicitly to the deploy or set it in config.toml.
- Run the deploy from the repo root so the relative path resolves.
supabase functions deploy hello --import-map ./supabase/functions/import_map.jsonAdd the missing specifier
Map every bare import to a concrete npm: or URL specifier in the import map.
// supabase/functions/import_map.json
{ "imports": { "stripe": "npm:stripe@14" } }How to prevent it
- Commit import_map.json and reference it by a stable repo-root path.
- Map every bare specifier the functions use.
- Deploy from the repo root so relative paths resolve in CI.