This warning appears when you try to use npm workspaces (monorepo feature) with npm version 6 or older. Workspaces were introduced in npm v7.0.0, so you need to upgrade npm to use this feature.
npm workspaces is a native monorepo feature that manages multiple packages from a single root directory. This feature was introduced in npm v7.0.0 released in late 2020. When npm detects workspace configuration but runs on npm v6 or earlier, it warns that workspaces are not supported.
Verify which npm version you're running:
npm --versionIf it's below 7.0.0, you need to upgrade.
Upgrade npm globally:
npm install -g npm@latestOr install a specific version:
npm install -g npm@9Verify the upgrade:
npm --versionnpm v7+ is bundled with Node.js v15.0.0+. Upgrade to Node.js 16 LTS or later:
- Download from https://nodejs.org/
- Or use nvm: nvm install --lts && nvm use --lts
- Or use Homebrew: brew install node@18
After upgrading, clear cache and reinstall:
npm cache clean --force
rm -rf node_modules package-lock.json
npm installCheck that your workspaces are properly recognized:
npm ls --workspacesYou should see a tree of your workspace packages without warnings.
npm workspaces support was gradually rolled out: npm v7.0.0 introduced basic workspace support, but npm v7.14.0+ added full support for npm install and npm uninstall within workspaces. If you're on npm v7.0-v7.13, consider upgrading further. For complex monorepos with version conflicts, use the overrides field in the root package.json to enforce consistent dependency versions (npm v8.3.0+).
npm notice access token expired or revoked. Please try logging in again.
Token has expired - npm authentication failure
npm ERR! code EAI_AGAIN
How to fix "EAI_AGAIN" in npm
npm error code E403 npm error 403 Forbidden - PUT https://registry.npmjs.org/<package>
How to fix 'E403 Forbidden' error in npm
npm ERR! code EUSAGE npm ERR! Usage error
How to fix "npm ERR! code EUSAGE" in Node.js projects
npm ERR! code E401 npm ERR! 401 Unauthorized
How to fix "E401 Unauthorized" in npm