Skip to content
Latchkey

Deno "error: Module not found" in CI

Deno tried to load a module from the resolved URL or path and got nothing back. The specifier points at a file, remote URL, or mapped import that does not exist as written.

What this error means

The run stops with "error: Module not found \"file:///.../missing.ts\"." or a remote URL, naming the specifier Deno could not resolve.

deno
error: Module not found "file:///home/runner/work/app/app/src/util.ts".
    at file:///home/runner/work/app/app/src/main.ts:1:20

Common causes

A wrong path, extension, or case

Deno requires the exact filename including extension; a missing .ts, a case difference, or a moved file makes the specifier unresolvable on the Linux runner.

A remote URL that is unreachable or moved

An https:// import points at a URL that returned 404 or is not fetchable, so the module cannot load.

How to fix it

Correct the specifier

  1. Read the exact URL or path in the error.
  2. Fix the extension, path, or case so it matches a file that exists (case-sensitive on Linux).
  3. Re-run to confirm the module resolves.
src/main.ts
// include the extension and exact case
import { util } from "./util.ts";

Verify remote imports resolve

Open the remote URL to confirm it exists, or pin it through an import map so the specifier is stable.

Terminal
deno info https://deno.land/std@0.224.0/path/mod.ts

How to prevent it

  • Always include file extensions in relative imports.
  • Match filename case exactly; CI runs on case-sensitive Linux.
  • Pin remote specifiers so they cannot move or 404 later.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →