install node through nvm
This commit is contained in:
parent
4e3fbd5e61
commit
9cfd4044f1
@ -1,3 +1,16 @@
|
||||
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
||||
./../applications/gcc.sh
|
||||
sudo apt-get install -y nodejs
|
||||
# get nvm package
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
||||
|
||||
# export nvm to env table
|
||||
if [[ $(which zsh) == "/usr/bin/zsh" ]]; then
|
||||
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.zshrc
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.zshrc
|
||||
source ~/.zshrc
|
||||
else
|
||||
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.bashrc
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
fi
|
||||
|
||||
# install latest version of node
|
||||
nvm install node
|
Loading…
x
Reference in New Issue
Block a user