Loading...

Angular CLI cannot install errno -13


could anyone advise what I should do please?

My node and npm version as follows:
viviantekiMacBook-Air-2:~ Vivi1an$ node -v
v8.11.1
viviantekiMacBook-Air-2:~ Vivi1an$ npm -v
5.6.0

I tried to install Angular CLI by following the instructions on their website but I got an error after I typed in npm install -g @angular/cli
Error info as below:
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/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! /Users/Vivi1an/.npm/_logs/2018-04-02T09_00_20_531Z-debug.log viviantekiMacBook-Air-2:~ Vivi1an$

I have downloaded node.js in a local folder to use Babel, not sure if this has anything to do with it?
Many thanks!

- - Source

Answers

answered 2 mon ago Majutharan Majutharan #1

sudo npm install -g @angular/cli

comments powered by Disqus