sudo apt install nodejs
sudo apt install npm
Answer from abdelrahman aboneda on Stack OverflowVideos
How to install npm on Ubuntu 20.04?
Can I install npm without Node.js?
How do I update npm Ubuntu?
sudo apt install nodejs
sudo apt install npm
nvm is for installing node not npm, npm will be installed
What you're doing with nvm install npm, is attempting to install a node version called npm.
Do nvm install 14, let it run, check for errors, then once installed your have npm.
Hk, Ubuntu 22 LTS when running apt-get install nodejs i get version 12 which Mesh installer fails on loads of dependencies needing to be v14 or newer. Cant find how to get a new version of Node on Ubuntu, the manual lists a command that i get output errors with.
Per the Node.js website:
# Using Debian/Ubuntu
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
Then, you will have the latest version of Node.js.
If you're not a fan of curl <url> | bash -, or are using an unsupported distribution, you can try a manual installation.
Node is one of the easier projects to build. Just change the version as that continues to change.
Browse to http://nodejs.org/dist/latest/ to find out the latest package version.
cd /usr/local/src
wget http://nodejs.org/dist/latest/node-v7.2.1.tar.gz
tar -xvzf node-v7.2.1.tar.gz
cd node-v7.2.1
./configure
make
sudo make install
which node
You should see /usr/local/bin/node.