Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| install_yarn_latest_node.js_on_linux [11.11.2020 04:51] – created Pascal Suter | install_yarn_latest_node.js_on_linux [13.11.2020 23:16] (current) – Pascal Suter | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== install yarn & latest node.js on linux ====== | ====== install yarn & latest node.js on linux ====== | ||
| + | run all these steps as root to install nvm and node globally for all users. if you want to install node on a per-user basis, this guide is not for you, you need to modify the steps. | ||
| + | |||
| remove any nodejs versions installed via the packet manager of your os .. for example linux: | remove any nodejs versions installed via the packet manager of your os .. for example linux: | ||
| - | | + | apt remove --purge nodejs |
| - | install the latest version of nvm | + | install the latest version of nvm. note, this will install nvm globally for all users. |
| - | curl -o- https:// | + | < |
| - | export NVM_DIR=" | + | export XDG_CONFIG_HOME="/ |
| - | [ -s " | + | curl -o- https:// |
| - | [ -s " | + | echo 'export NVM_DIR=" |
| + | [ -s " | ||
| + | [ -s " | ||
| + | source / | ||
| + | </ | ||
| install latest version of nodejs with nvm | install latest version of nodejs with nvm | ||
| Line 13: | Line 19: | ||
| add yarn repo (ubuntu, see [[https:// | add yarn repo (ubuntu, see [[https:// | ||
| - | | + | apt install curl gnupg2 # in case you are on a fresh and minimalistic installation, |
| - | curl -sS https:// | + | curl -sS https:// |
| - | echo "deb https:// | + | echo "deb https:// |
| install yarn without installing node.js from the repo.. | install yarn without installing node.js from the repo.. | ||
| - | | + | apt update && apt install --no-install-recommends yarn |