Skip to content

Instantly share code, notes, and snippets.

@NickMcSweeney
Created June 28, 2018 20:12
Show Gist options
  • Save NickMcSweeney/416230d7a27310ffff3751182b2debbf to your computer and use it in GitHub Desktop.
Save NickMcSweeney/416230d7a27310ffff3751182b2debbf to your computer and use it in GitHub Desktop.
Getting nodejs & npm setup on Arch Linux

Setup

IMPORTANT use nvm to install everything or your permisions will be all sorts of messed up.

install nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

configure nvm

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

confirm install was done corectly

command -v nvm --> [output: ] --> nvm

install nodejs & npm

latest version

nvm install node

specific version

nvm install NODE_VERSION_NUMBER > ie. nvm install 8

set version

latest version

nvm use node

specific version

nvm use NODE_VERSION_NUMBER > ie. nvm use 8

check versions

node --version
npm -v

should be good to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment