Skip to content

Difficult to understand the error message when the extension is missing #8024

Closed
@taiju

Description

@taiju

I found it difficult to understand the error message when the script file was created without the extension.

To Reproduce

deno --version
deno 1.4.6
v8 8.7.220.3
typescript 4.0.3
rm -rf ~/.cache/deno/*
cat <<EOT > mod
import * as log from "https://deno.land/std/log/mod.ts";

log.info("hello");
EOT
deno run mod

Result

thread 'main' panicked at 'Cached source file doesn't exist', cli/global_state.rs:222:8
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

If there is no import statement, it will not be reproduced. (So it was even more confusing.)

It would be nice if we could read the error messages to see that the files specified in the deno run must have an extension.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working correctlyclirelated to cli/ dir

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions