Skip to content

Instantly share code, notes, and snippets.

@nickyfoto
Created December 22, 2018 21:26
Show Gist options
  • Save nickyfoto/6d4e15f836ea1ea00325c6bfbd084e4e to your computer and use it in GitHub Desktop.
Save nickyfoto/6d4e15f836ea1ea00325c6bfbd084e4e to your computer and use it in GitHub Desktop.
Setup nvm, node and yarn on cloud9
#!/bin/sh
# setup nvm node yarn on aws cloud9
set -e
cd ~/.nvm
git init
git remote add origin https://github.com/creationix/nvm.git
rm nvm-exec nvm.sh
git fetch --tags
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Checking out tag $TAG..."
git checkout "$TAG"
source ~/.nvm/nvm.sh
# install latest node
nvm install node
# install yarn
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn -y
yarn --version
@Santoshah
Copy link

thanks 👍

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