About installing node environment in Ubuntu server

The solution for installing and installing node environment in Ubuntu server.

Of course you can also install from source code, but I don’t like it, it feels troublesome, so I just don’t like it

1. Install node
sudo apt-get install nodejs-legacy

2. Install npm
sudo apt-get install npm

The above two commands are executed successfully, then node has been installed successfully, but when node -v is clicked, I suddenly found that the version is wrong, it is a low version, (ps: I don’t like the low version, I like the latest version)

Therefore, upgrade node

3. Upgrade node version
sudo npm install npm@latest -g
This command represents upgrading to the latest stable version
4. You can also upgrade the specified version that is to install the n module
sudo npm install -g n

Upgrade node.js to the latest stable version
n stable

Upgrade node.js to the latest version
n latest

Upgrade node.js to the specified version
n v8.9.3

OK, so far node is installed successfully, please correct me

Recommended Posts

About installing node environment in Ubuntu server
How to install python in ubuntu server environment
Tutorial for setting up FTP server in Ubuntu 16.04 environment
Detailed steps for installing Django under Python 3.6 in Ubuntu 16.04 environment
Ubuntu16.04 build php5.6 Web server environment
Configure Java development environment in Ubuntu20.04 LTS
Download OpenJDK11 source code in Ubuntu environment
Ubuntu Server builds Hyperledger Fabric 2.1 learning environment
Install jetty in Ubuntu 18.04 Server, non-apt version
Graphical tutorial for installing Pycharm 2020.1 in Ubuntu 20.04
Docker those things in the Ubuntu environment
Edit OpenJDK11 source code in Ubuntu environment
How to configure TensorFlow use environment in Ubuntu
Install Python3 environment in a brand new Ubuntu
Remotely connect to MySQL database in Ubuntu environment
Installation and use of SSH in Ubuntu environment
Installation and simple practice of MySQL in ubuntu environment (1)
About Tencent Cloud ubuntu server Tomcat access slow problem
How to create a Python virtual environment in Ubuntu 14.04
Install and configure Mono production environment on Ubuntu Server
Resolve the problems encountered in the linux environment under ubuntu
Install mysql-pytho in Ubuntu
ubuntu16.04 deploy GPU environment
About win10 subsystem (ubuntu)
Ubuntu configuration development environment
Use supervisor in ubuntu
Ubuntu development environment configuration
Python virtual environment: Ubuntu16.04
Ubuntu Touch environment setup
Install python in Ubuntu
Install JDK in Ubuntu19.10
Ubuntu18.10 configure Java environment
ubuntu install nginx server
ubuntu environment deployment project
How to install memcache and start it in ubuntu environment
Encountered in the process of building a virtual environment in ubuntu
How to compile and install PHP and Nginx in Ubuntu environment
Method of setting up PHP operating environment under Ubuntu server