Common errors and troubleshooting

Diagnose Deno failures by permission, module, type, Node compatibility, and platform boundary

Classify the failure

SymptomInspect firstDo not immediately
NotCapable / requires accessresource and permission in the erroradd -A
Module not foundspecifier, imports, workspace, effective configdelete lockfile
npm package misses a filenode_modules mode, exports, install scriptspatch package internals
Type errors but execution worksdeno check graph and type sourcesignore CI
CI works, local failsDeno version, OS/arch, cache, environmentwipe all global caches
Local works, deploy failsrequest runtime, permissions, read-only FS, variablesassume platform equals laptop

Permission failure

error: Requires env access to "API_KEY"

Confirm that the code needs the variable, then use --allow-env=API_KEY. If a user controls the variable name, avoid granting the entire environment.

Module failure

deno info main.ts
deno install --reload --entrypoint main.ts

deno cache is deprecated in the current CLI; use deno install --entrypoint. --reload accesses the network and changes local cache state, so use it only after deciding resolution should be refreshed. Never delete deno.lock automatically because CI failed.

Reproducible report

Deno: <deno --version output>
Platform: <os/arch>
Command: <exact command, secrets removed>
Expected: <observable behavior>
Actual: <exit code + first relevant error>
Config: <effective deno.json path>
Minimal reproduction: <path or repository>

When testing for a runtime bug, search denoland/deno issues and match the current version.

Type to search all documentation.