Skip to content
Latchkey

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.

Deno
error: Module not found "https://deno.land/std@0.180.0/http/serve.ts".
    at https://deno.land/x/myapp/main.ts:1:21

Common 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

  1. Open the failing URL to confirm it returns 404.
  2. Update the import to a published version and correct path.
  3. Run deno cache main.ts to verify the whole graph resolves.
Terminal
deno cache main.ts

Centralize 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
// 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.

Frequently asked questions

What causes ""Module not found" (https import)"?
A std or third-party version was removed, or a path moved between versions, so the exact URL returns 404.
How do I fix "Module not found" (https import)?
Pin to a URL that resolves

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card