Skip to content

Instantly share code, notes, and snippets.

@DevEarley
Last active October 16, 2018 23:01
Show Gist options
  • Save DevEarley/72bfacbbd1bd6c1ac6e47060ebd447ad to your computer and use it in GitHub Desktop.
Save DevEarley/72bfacbbd1bd6c1ac6e47060ebd447ad to your computer and use it in GitHub Desktop.
Setup Angular CLI on MacOS

Setup Angular CLI on MacOS

I thought it was supposed to be easy! Well it is after I did a little digging.

Install tools

Download and Install

  • NodeJS (8)
  • NVM
  • VS Code

Setup NodeJS

Out of the box, node will run into permission issues. You will need something called NVM. Run the following commands:

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

You may have to install xcode command line developer tools, this will automatically happen if you don't already have it installed.

Replace 'username' with your home directory name.

export NVM_DIR="/Users/username/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm --version

That last command should return the version number.

Now tell NVM to install node. I am using 8.12.0.

nvm install 8.12.0

Then run this version

nvm use 8.12.0

Now that is all set up, setup Angular.

Setup Angular

Install Angular CLI

npm i -g @angular/cli

If you are using Sass in your project you will need the tool node-sass. For some reason I had to install this globally.

npm i -g node-sass

Anytime you open up a new terminal, you will need to run nvm use 8.12.0 to use node or npm.

Now everything is installed, create a project with Angular and .NET Core : .NET Core WebAPI and Angular Quick Start Guide

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