我试图使用sudo npm install -g @ angular / cli ....但是它给出错误......是因为我之前使用过sudo apt-get autoremove命令

时间:2018-02-03 06:59:52

标签: angular ubuntu angular-cli

pratik@pratik-Inspiron-15-3567:~$ npm install -g @angular/cli
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pratik/.npm/_logs/2018-02-03T06_48_18_710Z-debug.log

0 个答案:

没有答案