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:
npm uninstall -g angular-cli
npm cache clean
ornpm cache verify
(if npm > 5)npm install -g @angular/cli@latest