-1

After installing npm and node, I'm trying to install Angular-cli using this command line :

npm install -g @angular/cli@latest

Yet it gives me a permission error :

stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",

The obvious thing to do in this case is to precede the command with sudo so that it will be executed as a superuser but this seems to take the eternity.

Is there any other option that may save me some time struggling with the installation?

R. Richards
  • 24,603
  • 10
  • 64
  • 64
zakaria mouqcit
  • 393
  • 2
  • 4
  • 17
  • See the official guide by NPM on how to resolve this: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally – Basel Issmail Jan 05 '20 at 17:39

1 Answers1

0

After one day running, Sudo did the work for me. So those who are having the same issue, just do the installation as a superuser.

zakaria mouqcit
  • 393
  • 2
  • 4
  • 17