I'm using ubuntu 16.04, it's been a while since I want to install angular cli, probe with the command
npm install -g @angular/cli
I get an error like this in the terminal:
pm WARN checkPermissions Missing write access to /home/juanse/.npm-packages/lib/node_modules/@angular/cli
npm WARN checkPermissions Missing write access to /home/juanse/.npm-packages/lib/node_modules/@angular/cli/node_modules
npm WARN checkPermissions Missing write access to /home/juanse/.npm-packages/lib/node_modules/@angular
npm ERR! path /home/juanse/.npm-packages/lib/node_modules/@angular/cli
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/home/juanse/.npm-packages/lib/node_modules/@angular/cli'
npm ERR! { Error: EACCES: permission denied, access '/home/juanse/.npm-packages/lib/node_modules/@angular/cli'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/home/juanse/.npm-packages/lib/node_modules/@angular/cli\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/home/juanse/.npm-packages/lib/node_modules/@angular/cli' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /home/juanse/.npm/_logs/2018-06-04T16_09_24_688Z-debug.log
And for the ionic use the command:
npm install -g ionic
And I get the error:
npm WARN checkPermissions Missing write access to /home/juanse/.npm-packages/lib/node_modules/ionic npm WARN checkPermissions Missing write access to /home/juanse/.npm-packages/lib/node_modules/ionic/node_modules npm ERR! path /home/juanse/.npm-packages/lib/node_modules/ionic npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied,
access '/home/juanse/.npm-packages/lib/node_modules/ionic' npm ERR! {
Error: EACCES: permission denied, access '/home/juanse/.npm-packages/lib/node_modules/ionic' npm ERR! stack: 'Error: EACCES: permission denied, access \'/home/juanse/.npm-packages/lib/node_modules/ionic\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/home/juanse/.npm-packages/lib/node_modules/ionic'
}
npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue,
please double-check the npm ERR! permissions of the file and its containing directories,
or try running npm ERR! the command again as root/Administrator (though this is not recommended). npm ERR! A complete log of this run can be found in: npm ERR! /home/juanse/.npm/_logs/2018-06-04T16_13_38_163Z-debug.log
Help please, and investigate and tried everything but nothing manages to fix it