Skip to content

Missing flag --deny-import #29502

Closed
@lowlighter

Description

@lowlighter
Contributor

deno 2.3.3 (stable, release, x86_64-unknown-linux-gnu)

Deno is missing the --deny-import flag
The only workaround to remove the default imports is to pass an invalid hostname, which seems quite hacky

vscode ➜ /workspaces/metrics (x2025) $ deno run --deny-import --no-prompt test.ts 
error: unexpected argument '--deny-import' found

  tip: a similar argument exists: '--deny-hrtime'
  tip: to pass '--deny-import' as a value, use '-- --deny-import'

Usage: deno run [OPTIONS] [SCRIPT_ARG]...

vscode ➜ /workspaces/metrics (x2025) $ deno run --allow-import="" --no-prompt test.ts 
error: invalid empty host: ''
vscode ➜ /workspaces/metrics (x2025) $ deno run --allow-import="deny.invalid" --no-prompt test.ts 
vscode ➜ /workspaces/metrics (x2025) $ 

Activity

added a commit that references this issue on Jun 28, 2025
b5e41f6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @lowlighter

      Issue actions

        Missing flag `--deny-import` · Issue #29502 · denoland/deno