19

I just upgraded my project to use Node.js v9.0.0. When I start my project using npm, it tells me I should upgrade to a newer Node version, but I believe this is the newest version. I also believe I'm on the newest version of npm (5.5.1).

Do I need to worry about this warning? Is there a good way to resolve the issue?

Here's the full warning:

npm WARN npm npm does not support Node.js v9.0.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.
npm WARN npm You can find the latest version at https://nodejs.org/
Now using node v9.0.0 (npm v5.5.1)
user12341234
  • 6,573
  • 6
  • 23
  • 48

7 Answers7

36

I've just upgraded to Node v9 and ran into the same issue. There's a Github issue for this here.

Following the advice to uninstall a global instance of npm has resolved the issue for me, using:

npm uninstall -g npm
Kirk Larkin
  • 84,915
  • 16
  • 214
  • 203
5

With Node 10.6.0 on Windows 10 with Git Bash installed, I did this and all worked well:

1. Launch Git Bash terminal.

2. cd ~/AppData/Roaming

3. rm -rf npm

4. rm -rf npm-cache

5. npm install -g npm@latest

Check version and test on an existing project to verify (cd to project dir)...

6. npm -version

7. npm install

NB: Performing steps 2 through 4 via Windows Explorer could be faster.

Dut A.
  • 1,029
  • 11
  • 22
2

9.0.0 is indeed the latest version available at the moment. The reason that NPM shows you this message is because NPM hasn't updated their unsupported.js yet to accept 9.0.0 as a supported version.

I would say that you can probably use it without problems, but if you stumble upon one, know that it's probably caused by a breaking change in Node.js 9.0.0 and will very likely be fixed by the NPM team soon.

Niklas Higi
  • 2,188
  • 1
  • 14
  • 30
2

npm does not support Node.js v9.1.0

Uninstall did not work for me

npm uninstall -g npm

Node.js v9.1.0 comes bundled with npm v5.5.1. The latest version of npm is also v5.5.1, however, the version bundled with Node.js isn't exactly the same as the original version from npm.

The following is what I needed to do on MacOS

To completely uninstall node + npm, do the following:
1. go to /usr/local/lib and delete any node and node_modules.
2. go to /usr/local/include and delete any node and node_modules directory.
3. download and install node from nodejs.org
dak
  • 339
  • 6
  • 21
2

Latest update Jan 2018: NPM has released version 5.6.0 to work with this.

How to upgrade npm: Note if you are using node version 9 you will not be able to upgrade npm directly, since npm does not support version 9, so using nvm, downgrade node to latest stable release, that will make npm work, then use commandnpm install -g npm@latest to upgrade npm.

Akshay Vijay Jain
  • 13,461
  • 8
  • 60
  • 73
  • 1
    I first did uninstall with `npm uninstall -g npm` then followed it up with `npm install -g npm@latest` and node 9.5.0 and npm 5.6.0 seem to place nice together again. – Eric D. Johnson Feb 08 '18 at 15:36
1

Install nvm:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash\n

export NVM_DIR="$HOME/.nvm"\n[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

Download and use node X version:

nvm install 4.4.2
nvm use 4.4.2
node -v
Pablo Cegarra
  • 20,955
  • 12
  • 92
  • 110
0

[sudo] npm install -g npm@5.3.x remove this problem for me. ubuntu 16.10

Mikita Melnikau
  • 1,655
  • 2
  • 15
  • 30