siden
Posts: 1
Joined: Wed Jul 17, 2019 7:40 am

npm does not support Node.js v10.15.2

Wed Jul 17, 2019 8:21 am

Hello,

I can't install anything using npm with this bug

Code: Select all

[
npm install raspberry -g
npm WARN npm npm does not support Node.js v10.15.2
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/
[..................] - rollbackFailedOptional: verb npm-session 1c186402b32b27c
/code]

why npm 6.x is not aivalaible in repositories?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12121
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: npm does not support Node.js v10.15.2

Wed Jul 17, 2019 9:49 pm

Javascript is NOT java, in fact the only thing it shares in common with java is the name.
moved from java to other programming languages.

Heater
Posts: 13087
Joined: Tue Jul 17, 2012 3:02 pm

Re: npm does not support Node.js v10.15.2

Thu Jul 18, 2019 12:16 am

npm is the Node package manager.

npm is included with node releases. So that when you install node you always get the correct npm version with it.

Except Debian and/or Raspian has decided to break that by packaging npm separately from node in it's debs.

It is far better to install node.js directly from https://nodejs.org/en/download

Uninstall the Raspbian/Debian packages of node and npm first.

MeArm
Posts: 3
Joined: Mon Nov 30, 2015 5:16 pm

Re: npm does not support Node.js v10.15.2

Fri Sep 06, 2019 3:15 pm

I found the easiest fix for this is reinstall npm with the command

Code: Select all

curl https://www.npmjs.com/install.sh | sudo sh
I understand this is a post from July, but found it in my search for a solution to the problem mentioned above.

Heater
Posts: 13087
Joined: Tue Jul 17, 2012 3:02 pm

Re: npm does not support Node.js v10.15.2

Sat Sep 07, 2019 8:02 am

My preferred means to install node.js is to use the Mode Version Manager, nvm.

https://github.com/nvm-sh/nvm

Simple as :

Code: Select all

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

nvm install node 
It's very quick and easy and the magic is that one can install specific node versions, if for example a recent release breaks something for you:
nvm install 10.10.0
Then one can flip back and forth around releases as required.

nvm will work with and not disturb whatever old node version is installed from Debian apt but I think it's better to uninstall that old junk first.

Return to “Other programming languages”