timber.auhani
timber.auhani

Reputation: 177

Install angular on mac

I'm trying to install Angular on macOS. I have npm 5.6.0 and node 8.11.1 installed. I tried sudo npm install -g @angular/cli, which seems to install it. However, when I type ng --version, I get:

Unknown error: ReferenceError: Invalid left-hand side in assignment

Edit: I also tried this, to no effect:

Upvotes: 5

Views: 20601

Answers (3)

nakli_batman
nakli_batman

Reputation: 741

I think the best way to install angular on mac is using brew.

1.) Install brew, by typing the following command on your terminal :-

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2.) After Installing brew, then run following command :-

brew install angular-cli

After Installation, you'll see angular is successfully installed.

To check, Type Command :-

ng version

Upvotes: 1

teemak
teemak

Reputation: 301

You can use the macOS package manager. In your terminal type:

brew install angular-cli

To confirm your version:

ng --version

Upvotes: 20

Ignat
Ignat

Reputation: 29

Delete npm and node, then install them via brew (works perfect on mac os).

See https://brew.sh/

Upvotes: 0

Related Questions