I am trying to install angular-cli (v.1.0). I have two Mac computers, on which one device (MacBook Pro Mid-2015) the installation was successful. But on my other Mac (iMac Early-2011), I get the following error message:
`npm ERR! Darwin 16.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "-f" "@angular/cli"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! path ../lib/node_modules/@angular/cli/bin/ng
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/@angular/cli/bin/ng' -> '/usr/local/bin/ng'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, symlink '../lib/node_modules/@angular/cli/bin/ng' -> '/usr/local/bin/ng'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/@angular/cli/bin/ng',
npm ERR! dest: '/usr/local/bin/ng' }
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! /Users/Kaneda/npm-debug.log
npm ERR! code 1`
I used the following command to install it (without success):
npm install -g -f @angular/cli
After it failed, I tried to clean the cache, uninstall it, and try one more time - again without success (same error message as above):
npm cache clean
npm uninstall -g @angular/cli
npm install -g @angular/cli
In the error message, it says permission denied, but I am the only user on this mac with admin privileges.
Does anyone know what is wrong and why I cannot install it?
Thanks in advance.
Try running the command as root:
sudo npm install -g @angular/cli
@Chris1308 Thanks a lot! Worked flawlessly :) My gratitudes!
@kkanedaa please close this issue since it's resolved.
@yahyaKacem Sorry about that; closed :)
I am trying to install angular-cli on linux lite. I have installed nodejs.
root@LinuxLite-Notebook-PC:~# node -v
v9.5.0
What should I do? How to intsall angular-cli on linux lite. I ran the sudo npm install -g @angular/cli command, got errors that I have listed below.
root@LinuxLite-Notebook-PC:~# sudo npm install -g @angular/cli
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! path /usr/local/bin/ng
npm ERR! code EEXIST
npm ERR! Refusing to delete /usr/local/bin/ng: ../lib/node_modules/angular-cli/bin/ng symlink target is not controlled by npm /usr/local/lib/node_modules/@angular/cli
npm ERR! File exists: /usr/local/bin/ng
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-02-15T10_49_29_898Z-debug.log
I have the same problem, did someone find the solution?
I have the same problem
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Try running the command as root:
sudo npm install -g @angular/cli