Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/feed-rss2.php on line 8
Install Node.JS via Node Version Manager on Ubuntu 14.04 – AKLWEB HOST LLC Support Center https://support.aklwebhost.com Fri, 27 Dec 2019 07:33:20 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Install Node.JS via Node Version Manager on Ubuntu 14.04 https://support.aklwebhost.com/knowledgebase/install-node-js-via-node-version-manager-on-ubuntu-14-04/ https://support.aklwebhost.com/knowledgebase/install-node-js-via-node-version-manager-on-ubuntu-14-04/#respond Fri, 27 Dec 2019 07:33:20 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2936 Easily install and manage any version of Node.JS using the Node Version Manager (NVM). NVM is similar to Ruby’s RVM, allowing you to install and switch between different versions of Node.JS and NPM using the command line.

Update Ubuntu

Make sure to update your Ubuntu box with the latest packages by running these commands:

apt-get && apt-get upgrade

Install NVM

Install NVM by running this command:

curl https://raw.githubusercontent.com/creationix/nvm/v0.24.0/install.sh | bash

This will download the latest install script for NVM via curl and execute it. This usually only takes a few seconds. Once NVM has downloaded and finished installing, it will ask you to close and reopen your terminal. This will not be necessary, simply run:

source /root/.bashrc

Ensure NVM is properly installed by running the following command. This will output the usage instructions for NVM.

nvm

Install latest Node.JS

At the writing of this article, the latest major version of Node.JS is version 0.12.x. We will be using this version as an example. Install version 0.12.

nvm install 0.12

You can replace 0.12 with any version of node that’s available (0.10, 0.11.2, etc). NVM will download a pre-built binary version of Node.JS and install it. This should only take a few seconds. Once installation has completed, NVM will output the version installed, such as:

Now using node v0.12.0

Test your node installation. This command will output the version of node that has been installed.

node -v

Set default version

To ensure that the same node version is used the next time you log in via ssh, you can set a “default” node version by running:

nvm alias default 0.12

This will ensure that version 0.12 of node is always used when logging onto the server.

Switching Between Versions

Using NVM, you can install multiple versions of node. Once a different version is installed, for example 0.10, you can switch to that node version by running:

nvm use 0.10

Note that when switching between node versions, the associated npm version and any global npm packages will be changed as well. You may need to reinstall your global npm packages when switching to a recently installed version.

]]>
https://support.aklwebhost.com/knowledgebase/install-node-js-via-node-version-manager-on-ubuntu-14-04/feed/ 0