Node.js: Difference between revisions
Appearance
Created page with "== NVM == Category:Programming" |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
== NVM == | == NVM == | ||
<syntaxhighlight lang="bash"> | |||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash | |||
nvm install 20 | |||
nvm alias default 20 | |||
</syntaxhighlight> | |||
== Node via apt == | |||
<syntaxhighlight lang="bash"> | |||
sudo apt install npm | |||
mkdir -p ~/.npm-global | |||
npm config set prefix ~/.npm-global | |||
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc | |||
# echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bash_path | |||
source ~/.bashrc | |||
</syntaxhighlight> | |||
[[Category:Programming]] | [[Category:Programming]] | ||
Latest revision as of 14:35, 15 September 2025
NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
nvm install 20
nvm alias default 20
Node via apt
sudo apt install npm
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
# echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bash_path
source ~/.bashrc