- Requisites: brew
Install nvm
:
brew install nvm
Add this to your ~/.bashrc
or ~/.zshrc
:
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"
Install the Node.js versions you need:
nvm install node
Install yarn
with npm
:
npm install -g npm # self-update npm
npm install -g yarn
Add yarn
installed bins to $PATH
(on ~/.bashrc
or ~/.zshrc
):
export PATH="$HOME/.config/yarn/global/node_modules/.bin:$PATH"
Install and use globals:
yarn global add eslint serverless create-react-app
# Use
create-react-app hello-world