vuejs/vue-cli · error · Error

You are using an outdated version of NPM. It does not suppor

Error message

You are using an outdated version of NPM.
It does not support some core functionalities of Vue CLI.
Please upgrade your NPM version.

What it means

Thrown by ProjectPackageManager when npm is selected as the package manager but the installed npm version is below 6.9.0. Vue CLI requires npm 6.9+ for package alias support, which is a core functionality for managing plugin dependencies. The check runs `npm --version` synchronously and compares with semver.lt.

Source

Thrown at packages/@vue/cli/lib/util/ProjectPackageManager.js:129

      } else if (hasProjectPnpm(context)) {
        this.bin = 'pnpm'
      } else if (hasProjectNpm(context)) {
        this.bin = 'npm'
      }
    }

    // if no package managers specified, and no lockfile exists
    if (!this.bin) {
      this.bin = loadOptions().packageManager || (hasYarn() ? 'yarn' : hasPnpm3OrLater() ? 'pnpm' : 'npm')
    }

    if (this.bin === 'npm') {
      // npm doesn't support package aliases until v6.9
      const MIN_SUPPORTED_NPM_VERSION = '6.9.0'
      const npmVersion = stripAnsi(execa.sync('npm', ['--version']).stdout)

      if (semver.lt(npmVersion, MIN_SUPPORTED_NPM_VERSION)) {
        throw new Error(
          'You are using an outdated version of NPM.\n' +
          'It does not support some core functionalities of Vue CLI.\n' +
          'Please upgrade your NPM version.'
        )
      }

      if (semver.gte(npmVersion, '7.0.0')) {
        this.needsPeerDepsFix = true
      }
    }

    if (!SUPPORTED_PACKAGE_MANAGERS.includes(this.bin)) {
      log()
      warn(
        `The package manager ${chalk.red(this.bin)} is ${chalk.red('not officially supported')}.\n` +
        `It will be treated like ${chalk.cyan('npm')}, but compatibility issues may occur.\n` +
        `See if you can use ${chalk.cyan('--registry')} instead.`
      )

View on GitHub (pinned to 7eb93c169c)

Solutions

  1. Upgrade npm: `npm install -g npm@latest`.
  2. Upgrade Node.js (which bundles a newer npm): use nvm or download from nodejs.org.
  3. Switch to yarn or pnpm if available: `vue config set packageManager yarn`.

Example fix

# before
$ npm --version  # 6.4.1
Error: You are using an outdated version of NPM.
# after
$ npm install -g npm@latest
$ npm --version  # 8.x
Defensive patterns

Strategy: validation

Validate before calling

const semver = require('semver');
const { execSync } = require('child_process');
const npmVersion = execSync('npm --version', { encoding: 'utf-8' }).trim();
if (semver.lt(npmVersion, '6.9.0')) {
  console.error(`npm ${npmVersion} is too old for Vue CLI. Upgrade: npm install -g npm@latest`);
}

Try / catch

try {
  // run vue cli package operation
} catch (e) {
  if (e.message.includes('outdated version of NPM')) {
    console.error('Upgrade npm: npm install -g npm@latest');
    process.exit(1);
  }
  throw e;
}

Prevention

When it happens

Trigger: Running any Vue CLI command that installs or manages packages (create, add, upgrade) on a system with npm < 6.9.0 as the active package manager. Common with very old Node.js installations that bundled npm 5.x or 6.x early versions.

Common situations: Legacy Node.js installations, locked-down enterprise environments with old toolchains, or CI images that haven't been updated. Systems where yarn/pnpm are not available so Vue CLI falls back to npm.

Related errors


AI-assisted analysis of vuejs/vue-cli@7eb93c169c (2026-08-13). Data as JSON: /api/errors/62c8c2df6c2cc389. Report an issue: GitHub.