Deno Error Messages
JavaScript and TypeScript runtime with built-in tooling.All Deno pages
- Deno: error: Import "chalk" not a dependencyDeno 2 rejects a bare import like chalk with Import not a dependency: the name is not mapped in deno.json. Run deno add npm:chalk or import it as npm:chalk.
- Deno: error: Module not found "file:///.../utils". Maybe add a '.ts' extensionDeno fails with error: Module not found when an import points to a file that does not exist. Deno needs the path with the extension: ./utils.ts, not ./utils.
- Deno: error: Uncaught (in promise) ReferenceError: require is not definedDeno runs .js and .ts files as ES modules, so require() fails with ReferenceError: require is not defined. Use import, rename to .cjs, or set type commonjs.
- Deno: NotCapable: Requires read access to "data.txt", run again with the --allow-read flagDeno 2 throws NotCapable: Requires read access when a script reads a file without permission. Grant it with --allow-read=PATH, -P with deno.json, or -A.