Skip to content

pnpm audit "Unknown option: 'interactive'" #814

Description

@tomstrong64

The interactive flag does not work for pnpm audit --fix.
I have tried all variations including order of flags, with and without an argument for --fix and the full --interactive and short -i flags.

Versions tested: 11.1.2, 11.4.0 (both gave the same output)

pnpm was installed both times with corepack use pnpm@latest-11

pnpm -v
11.4.0

# fails on both update and override
pnpm audit --fix=update -i
 ERROR  Unknown option: 'interactive'
For help, run: pnpm help audit

pnpm audit --fix=override -i
 ERROR  Unknown option: 'interactive'
For help, run: pnpm help audit

# help menu detailing usage
pnpm help audit
Version 11.4.0
Usage: pnpm audit [options]
       pnpm audit signatures [options]

Checks for known security issues with the installed packages.

Commands:
      signatures           Verify ECDSA registry signatures for installed packages from registries that provide signing keys at /-/npm/v1/keys.

Options:
      --audit-level <severity>  Only print advisories with severity greater than or equal to one of the following: info|low|moderate|high|critical. Default: low
  -D, --dev                     Only audit "devDependencies"
      --fix [method]            Fix the audited vulnerabilities using the specified method: "override" or "update". "override" adds overrides to the package.json file in order to force
                                non-vulnerable versions of the dependencies. "update" attempts to update the vulnerable packages in the lockfile to non-vulnerable versions. If no method is
                                specified, "override" is used by default.
      --ignore <vulnerability>  Ignore a vulnerability by its GitHub advisory ID (e.g. GHSA-xxxx-xxxx-xxxx)
      --ignore-registry-errors  Use exit code 0 if the registry responds with an error. Useful when audit checks are used in CI. A build should not fail because the registry has issues.
      --ignore-unfixable        Ignore all vulnerabilities for which no fix exists
  -i, --interactive             Show vulnerabilities and select which ones to fix interactively
      --json                    Output audit report in JSON format
      --no-optional             Don't audit "optionalDependencies"
  -P, --prod                    Only audit "dependencies" and "optionalDependencies"

Visit https://pnpm.io/11.x/cli/audit for documentation about this command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions