{"record":{"id":"62c8c2df6c2cc389","repo":"vuejs/vue-cli","slug":"you-are-using-an-outdated-version-of-npm-it-does","errorCode":null,"errorMessage":"You are using an outdated version of NPM.\nIt does not support some core functionalities of Vue CLI.\nPlease upgrade your NPM version.","messagePattern":"You are using an outdated version of NPM\\.\nIt does not support some core functionalities of Vue CLI\\.\nPlease upgrade your NPM version\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@vue/cli/lib/util/ProjectPackageManager.js","lineNumber":129,"sourceCode":"      } else if (hasProjectPnpm(context)) {\n        this.bin = 'pnpm'\n      } else if (hasProjectNpm(context)) {\n        this.bin = 'npm'\n      }\n    }\n\n    // if no package managers specified, and no lockfile exists\n    if (!this.bin) {\n      this.bin = loadOptions().packageManager || (hasYarn() ? 'yarn' : hasPnpm3OrLater() ? 'pnpm' : 'npm')\n    }\n\n    if (this.bin === 'npm') {\n      // npm doesn't support package aliases until v6.9\n      const MIN_SUPPORTED_NPM_VERSION = '6.9.0'\n      const npmVersion = stripAnsi(execa.sync('npm', ['--version']).stdout)\n\n      if (semver.lt(npmVersion, MIN_SUPPORTED_NPM_VERSION)) {\n        throw new Error(\n          'You are using an outdated version of NPM.\\n' +\n          'It does not support some core functionalities of Vue CLI.\\n' +\n          'Please upgrade your NPM version.'\n        )\n      }\n\n      if (semver.gte(npmVersion, '7.0.0')) {\n        this.needsPeerDepsFix = true\n      }\n    }\n\n    if (!SUPPORTED_PACKAGE_MANAGERS.includes(this.bin)) {\n      log()\n      warn(\n        `The package manager ${chalk.red(this.bin)} is ${chalk.red('not officially supported')}.\\n` +\n        `It will be treated like ${chalk.cyan('npm')}, but compatibility issues may occur.\\n` +\n        `See if you can use ${chalk.cyan('--registry')} instead.`\n      )","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/vuejs/vue-cli/blob/7eb93c169c7520935252e2473387f923ef80d856/packages/@vue/cli/lib/util/ProjectPackageManager.js#L111-L147","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Upgrade npm: `npm install -g npm@latest`.","Upgrade Node.js (which bundles a newer npm): use nvm or download from nodejs.org.","Switch to yarn or pnpm if available: `vue config set packageManager yarn`."],"exampleFix":"# before\n$ npm --version  # 6.4.1\nError: You are using an outdated version of NPM.\n# after\n$ npm install -g npm@latest\n$ npm --version  # 8.x","handlingStrategy":"validation","validationCode":"const semver = require('semver');\nconst { execSync } = require('child_process');\nconst npmVersion = execSync('npm --version', { encoding: 'utf-8' }).trim();\nif (semver.lt(npmVersion, '6.9.0')) {\n  console.error(`npm ${npmVersion} is too old for Vue CLI. Upgrade: npm install -g npm@latest`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  // run vue cli package operation\n} catch (e) {\n  if (e.message.includes('outdated version of NPM')) {\n    console.error('Upgrade npm: npm install -g npm@latest');\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Keep npm updated alongside Node.js.","Check `npm --version` in CI setup scripts and fail fast if below 6.9.0.","Configure Vue CLI to use yarn or pnpm if npm cannot be upgraded: `vue config set packageManager yarn`."],"tags":["package-manager","npm","environment","version","dependency-management"],"backgroundTag":null,"analyzedSha":"7eb93c169c7520935252e2473387f923ef80d856","analyzedAt":"2026-08-13T10:13:37.803Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}