2

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? Commented May 23, 2019 at 10:38
  • yes I have tried using sudo also Commented May 23, 2019 at 10:43

2 Answers 2

1

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...

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.