Install Node JS on Ubuntu #95

Open
opened 9 months ago by rbsetiawan · 0 comments
Owner

Apt Install

sudo apt update
sudo apt install nodejs
node -v
sudo apt install npm
npm -v
sudo apt-get remove nodejs
node -v
sudo apt-get remove npm
npm -v
sudo apt-get update
sudo reboot

Installing Node Using the Node Version Manager (NVM)

  • install pakage node
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"
  • list node version available
nvm list-remote
  • install node
# Download and install Node.js:
nvm install v22.20.0

# Verify the Node.js version:
node -v # Should print "v22.20.0".
# Verify npm version:
npm -v # Should print "10.9.3".
# Apt Install - Default Install nodejs and npm https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-22-04 ``` sudo apt update sudo apt install nodejs node -v sudo apt install npm npm -v ``` - UInstall nodejs and npm https://stackoverflow.com/questions/32426601/how-can-i-completely-uninstall-nodejs-npm-and-node-in-ubuntu ``` sudo apt-get remove nodejs node -v sudo apt-get remove npm npm -v sudo apt-get update sudo reboot ``` # Installing Node Using the Node Version Manager (NVM) - install pakage node ``` # Download and install nvm: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash # in lieu of restarting the shell \. "$HOME/.nvm/nvm.sh" ``` - list node version available ``` nvm list-remote ``` - install node ``` # Download and install Node.js: nvm install v22.20.0 # Verify the Node.js version: node -v # Should print "v22.20.0". # Verify npm version: npm -v # Should print "10.9.3". ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.