0
votes

Error during angular6 installation using the command npm install -g @angular/cli

following error showing
npm WARN notsup Not compatible with your operating system or architecture: [email protected] npm ERR! Linux 4.15.0-36-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/shahid/npm-debug.log

2

2 Answers

0
votes

Run the following command as told

sudo npm install -g @angular/cli

angular needs to be installed as root user.

0
votes

In Ubuntu while you are install any package with -g , then Ubuntu must need's the root level permission.

For that you can assign permission via sudo command.

Use this command.

sudo npm install -g @angular/cli

Then it will ask for password and enter your system password. :)