Search code examples
node.jsnpmupgrade

How to solve "npm does not support Node.js v11.3.0" warning after upgrading NodeJs 11 from NodeJs 8?


Windows Server 12, Node 8 installation. I have installed Node 11 and all npm operations show the following warning:

npm WARN npm npm does not support Node.js v11.3.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. npm WARN npm You can find the latest version at https://nodejs.org/ 6.4.1

node -v shows

v11.3.0

I have tried the following:

  • npm uninstall -g npm and repair node using 11.3 installer
  • npm install -g npm

but I receive the same warming.

I have tried an Angular 7 project and npm install seem to work properly, but the warning worries me.

Not sure if it helps, but where npm shows the following:

C:\Program Files\nodejs\npm
C:\Program Files\nodejs\npm.cmd
C:\Users{logged in username}\AppData\Roaming\npm\npm
C:\Users{logged in username}\AppData\Roaming\npm\npm.cmd

Question: How to solve "npm does not support Node.js v11.3.0" warning after upgrading NodeJs 11 from NodeJs 8?


Solution

  • Sometimes cleaning cache helps.

    Do a sudo npm cache clean -f before the install.

    Maybe you can use npm i -g npm@latest and see if it works