Install nvm
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
Run
command -v nvm
then close your current terminal and open a new terminal.
Install latest node
nvm install node
or install LTS node
nvm install --lts
Node LTS on Endless
Cordova on Endless with npm install -g cordova