Skip to content

Instantly share code, notes, and snippets.

@TomTasche
Created April 22, 2017 12:23
Show Gist options
  • Save TomTasche/96dbaf00b235894a336eb05330acdcfe to your computer and use it in GitHub Desktop.
Save TomTasche/96dbaf00b235894a336eb05330acdcfe to your computer and use it in GitHub Desktop.
#!/bin/bash
# install node
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install git nodejs --yes
# fix npm permissions: https://docs.npmjs.com/getting-started/fixing-npm-permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo "export PATH=~/.npm-global/bin:\$PATH" >> ~/.profile
source ~/.profile
# update npm to latest version
npm install npm -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment