Deno Deploy "Module not found" for an HTTPS import in CI
Deno resolves remote imports by URL at build time. If an https:// import returns 404, the host is gone, or the pinned version was removed, the module graph cannot be built and the deploy fails.
What this error means
The deploy or deno cache fails with "error: Module not found \"https://...\"." The URL points at a dependency that no longer resolves at that exact path or version.
error: Module not found "https://deno.land/std@0.180.0/http/serve.ts".
at https://deno.land/x/myapp/main.ts:1:21Common causes
The pinned URL no longer exists
A std or third-party version was removed, or a path moved between versions, so the exact URL returns 404.
A typo or wrong host in the import
The import URL has a mistyped path, the wrong registry host, or a version that was never published.
How to fix it
Pin to a URL that resolves
- Open the failing URL to confirm it returns 404.
- Update the import to a published version and correct path.
- Run
deno cache main.tsto verify the whole graph resolves.
deno cache main.tsCentralize remote imports
Move remote URLs into an import map or deps file so a moved module is fixed in one place, not scattered across files.
// deno.json
{
"imports": {
"@std/http/": "https://deno.land/std@0.224.0/http/"
}
}How to prevent it
- Pin remote imports to specific, published versions.
- Centralize URLs in an import map or deps.ts.
- Run deno cache in CI to fail fast on an unresolved graph.