2
votes

I am using:

node -v v10.15.3

npm -v 6.4.1

I have tried below mentioned command

command: npm i -g angular/cli

Error while executing: npm ERR! /usr/local/bin/git ls-remote -h -t ssh://[email protected]/angular/cli.git

command: npm i -g @angular/cli

npm ERR! path /Users/admin/.node_modules/bin/ng npm ERR! code EEXIST npm ERR! Refusing to delete /Users/admin/.node_modules/bin/ng: ../lib/node_modules/angular-cli/bin/ng symlink target is not controlled by npm /Users/admin/.node_modules/lib/node_modules/@angular/cli npm ERR! File exists: /Users/admin/.node_modules/bin/ng npm ERR! Move it away, and try again.

2
you try with admin privilege? - Elvis Jr
yes I have tried using sudo also - Amnah khatun

2 Answers

1
votes

Make sure you have the correct path in Enviroment variable -> user variable like this

enter image description here

In this case my npm folder are located at

C:\Users\phuc.ngo\AppData\Roaming\npm

The npm folder is where everything you install can be found like angular cli, webpack, etc...

0
votes

You need to try installing angular with admin previledge and try to install it globally with -g

npm install -g @angular/cli

after installation check the angular version

ng --version