config global deprecated npm Origin: Build & delivery Last updated 12 Oct 2026

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

A deprecation warning printed by npm 8.11–8.12 for the --global flag.

Exact message you may see `--global`, `--local` are deprecatedUse `--location=global` instead
Seen on: npm

Meaning

Harmless; caused by a bug in specific npm versions and fixed in later releases.

Common causes

  • npm 8.11/8.12
  • Scripts using --global/-g

⚡ Quick fix

  1. Upgrade npm: npm install -g npm@latest
  2. Ignore — installs still work

Detailed fix by platform

npm

  1. npm install -g npm@latest

How to diagnose

  1. Version — npm -v
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

0xC1900101 — Windows upgrade error 0xC1900101 (driver error, rolled back) (Windows)0xC1900101caching_sha2_password — Authentication plugin 'caching_sha2_password' cannot be loaded (MySQL)caching_sha2_passwordcb() never called — npm ERR! cb() never called! (npm)cb() never calledcomponentWillMount renamed — Warning: componentWillMount has been renamed, and is not recommended for use. (React)componentWillMount re…cookies() should be awaited — Next.js 15: Route "/x" used `cookies().get('token')`. `cookies()` should be awaited before using its value (Next.js)cookies() should be a…Corepack keyid — Error: Cannot find matching keyid (Corepack signature verification) (npm)Corepack keyiddefaultProps deprecated — Warning: Support for defaultProps will be removed from function components in a future major release. (React)defaultProps deprecat…DEP0005 — DeprecationWarning: Buffer() is deprecated due to security and usability issues (DEP0005) (Node.js)DEP0005config gl…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.