VueJS pass data and methods to child component
For me the easiest way is to use
n package. Just install whatever Node version your official distribution ships with.
sudo yum install nodejs
or, depending on what Linux you're using.
sudo apt-get install nodejs
n as a global package.
sudo npm install -g n
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
+ [email protected]
added 1 package from 4 contributors in 0.201s
Done, it was that easy. Now install the version of node you want to use:
sudo n lts <--- latest LTS official release
sudo n latest <--- latest official release
sudo n stable <--- stable official release
sudo n 10.16.0 <--- specific version
n on its own to view your downloaded versions, and install the selected one.
Use up/down arrow keys to select a version, return key to install, d to delete, q to quit
Run the official install script by executing one of below commands:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Rerun Profile script to start NVM
nvm should be running and you can confirm it by running below
Node Version Manager (v0.35.3)
If everything went fine, make
nvm use your currently installed Node version
nvm use system
Now using system version of node: v8.11.2 (npm v6.9.0)
List available versions using
Install the latest release of node
nvm install node <--- latest version
nvm install 10.16.0 <--- specific version
If after exiting console and logging in again
nvm is not a recognised command, you'll need to add
source ~/.bashrc to your
.bash_profile file to make sure it's automatically run on every login. A good explanation of what's going on, can be found here.