1

After npm install -g @angular/cli this is what I recive:

npm WARN optional Skipping failed optional dependency /@angular/cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4
npm ERR! Linux 4.15.0-38-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "@angular/cli"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ipaulbogdan/npm-debug.log
0

From https://www.npmjs.com/package/@angular/cli#installation

Install Globablly

npm install -g @angular/cli

Install Locally

npm install @angular/cli

In Linux, every time you install something, when that something is Global means you need root access and when something is Local just with your user is enough


To translate that into commands

Global

sudo npm install -g @angular/cli

Local

npm install @angular/cli


Permission Denied

You can see what is the problem clearly in the log

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'

Probably the installer wants to write there but can's because only the root user can

  • Thanks man.Appreciate your help.It's working now. – Idorasi Paul Nov 29 '18 at 11:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.