First I’ve tried to install Node using yum package installer ( epel repository ), but it didn’t install latest Node and npm versions. To after some investigation I decided to install Node using nvm package installer.
Installation is quite simple and straight forward and didn’t raise any new issues – to my surprise.
NVM package repository is at https://github.com/creationix/nvm.
To begin installation ( or update nvm ) use install script
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Script will clone nvm repository to ~/.nvm and add source lines to your profile. Details on installation specifics you can find on repository home page.
Important: After installation close the terminal, and reopen new session.
Note: On Linux, after running the install script, if you get
nvm: command not found or see no feedback from your terminal after you type:
command -v nvm
Install Node and npm
To install latest node release just enter :
nvm install --latest-npm
After installation check node and npm versions
[[email protected] ~]$ node -v v10.9.0 [[email protected] ~]$ npm -v 6.4.0
NVM installation gives option to use several Node versions, but for this you need to specify which node version your project will use.