Skip to content
Latchkey

deno info: Inspect Modules and Cache

deno info shows where the cache lives, or prints the full dependency graph of a module.

When a CI cache misses or an import resolves wrong, deno info is the diagnostic: it reports DENO_DIR paths and the resolved graph.

What it does

With no arguments, deno info prints the cache directories (DENO_DIR, remote modules, npm cache). Given a module, it prints the resolved dependency tree with sizes and whether each piece is cached.

Common usage

Terminal
deno info                 # show cache locations
deno info main.ts         # show the dependency graph
deno info --json main.ts  # machine-readable graph
deno info npm:chalk

Options

ItemWhat it does
(no args)Print DENO_DIR and cache directory locations
<module>Print the resolved dependency graph for a module
--jsonEmit the graph or cache info as JSON
--no-checkSkip type-checking when resolving

In CI

Run deno info at the start of a job to print the DENO_DIR path you must cache; restoring the wrong directory is the most common cause of cache misses. deno info <entry> --json also lets a script assert that everything is cached before a --cached-only run.

Common errors in CI

"Module not found" means the specifier cannot be resolved. If deno info shows dependencies as not cached when you expected a hit, DENO_DIR was not restored or points elsewhere. An empty or unexpected cache path usually means DENO_DIR is unset and Deno is using the default home location, which CI did not cache.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →