0

I was trying to install angular/cli using this command in Putty:

npm install -g @angular/cli

but it failed and run through these error messages:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly
cound not install angular/cli
Error: ENOENT, stat 'angular/cli'

How to fix this issue? TIA

1 Answers1

0

It is clearly saying Permission denied as -g is installing the thing globally so you do not have enough rights to install the package globally. For that matter you need to research on error Permission denied (publickey) specifically to your hosting/cloud service provider.

However if you just deploying the angular cli app on the server you do not have to install angular cli globally anyway.

If it is your build server or something just do npm install or yarn first and then run this command npm run ng -- build --prod it will run the local version of angular cli specified in your package.json

angularrocks.com
  • 26,767
  • 13
  • 87
  • 104