The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
npm "unsupported Node version" warning gives nonsensical advice
What I Did
Use of an old version of
npm with current version of
Expected warning (which occurs), but advice given is nonsensical.
$ npm test npm WARN npm npm does not support Node.js v11.1.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10. npm WARN npm You can find the latest version at https://nodejs.org/
Install current version of Node (11.x)
$ npm install -g npm@^5
Issue npm command
The warning message given appears to only consider use of new
npm with old
Telling user to upgrade
node (lines 2 & 5) makes no sense; it should say to upgrade
Occurs on both Unix and Windows
$ node --version v11.1.0 $ npm --version 5.10.0
You’re running an older version of npm, which doesn’t support node 11 yet (or at least doesn’t know if it does). Explicit support has been added in
v6.0.1. As for the wording of the warning message, there’s a PR for that but the author closed it for some reason.
I know I’m running an older version of
npm. It’s the wording of the warning that’s the problem. Looked at the PR, and while much improved, should still be recommending an
npm update rather than a Node downgrade.
I’ll take a new PR if anyone’s interested. I’d rather the recommendation become more neutral than downgrading or upgrading, and just mention that one or the other should be changed to a compatible version.