![]() Just to confirm the latest LTS version has been installed run the command: $ node -version To install the latest LTS version of Node.JS, execute: $ nvm install -lts ![]() At the time of publishing this guide, the latest LTS version is v16.14.2. The output provides all the possible versions that can be installed including the LTS versions on Node.JS. To retrieve a list of all the Node.JS versions that can be installed, run the command: $ nvm list-remote You can verify the version of nvm installed by executing the command: $ nvm -version So, close your terminal and launch it once more to begin running nvm commands. Towards the end, the output will inform you that you need to reopen your terminal to start using nvm. To download the NVM script, run the command: $ curl | bash Using NVM, you can install, uninstall and set a specific Node.JS version as the default version. ![]() Node Version Manager, abbreviated as NVM, is a shell script that helps in the management of multiple Node.JS versions on a per-user basis. To confirm that Node.JS was installed, run the command: $ node -versionįor npm, run the command: $ npm -versionĬonfirm NodeJS Version Method 2: Install Node.JS and NPM Using NVM The NodeJS package provides both nodejs and npm binaries. ![]() Nodesource Installation Scriptįor example, to install NodeJS, run the command: $ sudo apt install nodejs -y The output will also provide you will additional instructions on how to proceed. The script adds a Nodesource signing key, creates a repository of Nodesource in the sources list file, and updates the apt cache. To start off, download and run the Nodesource installation script as shown. The alternative way of installing Node.JS and NPM is to install from NodeSource, which is an organization that is geared towards helping companies run mission-critical Node.JS applications with an emphasis on performance and resource utilization.
0 Comments
Leave a Reply. |