I am trying to install angular cli using the command in ubuntu system.
npm install -g @angular/cli
BUt i am facing the following error: 782 verbose Linux 5.0.0-23-generic 783 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "@angular/cli" 784 verbose node v10.19.0 785 verbose npm v6.13.4 786 error code EACCES 787 error syscall access 788 error path /usr/lib/node_modules 789 error errno -13 790 error Error: EACCES: permission denied, access '/usr/lib/node_modules' 790 error { [Error: EACCES: permission denied, access '/usr/lib/node_modules'] 790 error stack: 790 error 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'', 790 error errno: -13, 790 error code: 'EACCES', 790 error syscall: 'access', 790 error path: '/usr/lib/node_modules' } 791 error The operation was rejected by your operating system. 791 error It is likely you do not have the permissions to access this file as the current user 791 error 791 error If you believe this might be a permissions issue, please double-check the 791 error permissions of the file and its containing directories, or try running 791 error the command again as root/Administrator. 792 verbose exit [ -13, true ]
Any reason why I am facing this issue?
sudo npm install -g @angular/cli
– Roberto Zvjerkovićsudo npm install -g @angular/cli
.. You should installcli
with user persmission for which it shows the error asError: EACCES: permission denied
.. So you need to usesudo
infront of the cli command.. – Maniraj Murugannpm uninstall -g @angular/cli
. Clean the cache:npm cache clean --force
install the cli globally again:sudo npm install -g @angular/cli
– Jacopo Sciampi