npm does not support Node.js v10.19.0

18,188

Short Answer

The simplest is to update to Node.js v12:

curl -fsSL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

Long Answer

You could update to newer Node.js-versions, see: https://github.com/nodesource/distributions#readme however according to a comment on github, jumping to the newest version, might lead to breaking changes. (I don't notice any.)

Thanks to a comment from @SaidbakR below : To see which version is compatible check the following table:


| NodeJS  | `npm --version` |
|---------|-----------------|
| Node 16 | 6.0+            |
| Node 14 | 4.14+           |
| Node 12 | 4.12+           |
| Node 10 | 4.9+, <6.0      |

I skipped the uneven numbers, because they don't have a long-term-support. Node 18 is as of May 2022 in a prerelease state.

If you would like to update to e.g. Node.js 16, edit the number from the code above:

curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

This answer is based on (How to update node.js) as well on (compatible node.js and npm-Versions)

Share:
18,188
JoKalliauer
Author by

JoKalliauer

Updated on September 18, 2022

Comments

  • JoKalliauer
    JoKalliauer almost 2 years

    npm does not support Node.js v10.19.0 You should probably upgrade to a newer version of node as we can't make any promises that npm will work with this version. You can find the latest version at https://nodejs.org/

  • Giorgos Xou
    Giorgos Xou about 2 years
    For those having an ERROR E: The repository 'http://ppa.launchpad.net/bluetooth/bluez/ubuntu focal Release' does not have a Release file., just run sudo add-apt-repository --remove ppa:bluetooth/bluez and you will be able to run the above commands
  • Admin
    Admin about 2 years
    I'd like to combine this answer with That Answer on the Stack Overflow. Both of them offers complete solution npm running issues