Skip to content

Strange error message if you typo a remote package URL in a single-file script #26169

Open
@Benaiah

Description

@Benaiah

Version: Deno 2.0.0

Detailed version info:

deno 2.0.0 (stable, release, aarch64-apple-darwin)
v8 12.9.202.13-rusty
typescript 5.6.2

Running deno index.ts with a clean cache (ran deno clean immediately before) in a directory containing only index.ts with the following contents:

import { DB } from "https://deno.land/x/[email protected]/mod.ts"

(note: the [email protected] instead of [email protected] is intentional; that's what triggers this strange and misleading error)

...results in the following error:

deno-experiments % deno -A index.ts
error: unrecognized subcommand

  tip: some similar subcommands exist: 'init', 'lint'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working correctlyclirelated to cli/ dir

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions