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 ERR! code ENOAUDIT npm ERR! Audit endpoint not supported
How to fix "npm ERR! code ENOAUDIT - Audit endpoint not supported"
npm ERR! code EBADDEVENGINES npm ERR! devEngines.runtime incompatible with current node version
How to fix "npm ERR! code EBADDEVENGINES - devEngines.runtime incompatible with current node version"
npm ERR! code ETOOMANYARGS npm ERR! Too many arguments
How to fix "npm ERR! code ETOOMANYARGS - Too many arguments"
npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name: tag names cannot contain spaces
How to fix "npm ERR! code EINVALIDTAGNAME - tag names cannot contain spaces"
npm ERR! code E400 npm ERR! 400 Bad Request
How to fix "npm ERR! code E400 - 400 Bad Request" error