estoy usando ubuntu 16.04, hace tiempo que ya quiero instalar angular cli, probe con el comando
npm install -g @angular/cli
Me sale en la terminal un error asi:
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
Y para el ionic uso el comando:
npm install -g ionic
Y me sale el 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
Ayuda por favor, e investiga y probado de todo pero nada logra arreglarlo