Issue
I am a new coder trying to get started with Angular and Node following a tutorial on Udemy. I have successfully (I think) installed Node.js and I'm running version 16.15.1 but when I try to install the angular client it fails every time (screenshot attached). Please could someone point out where I am going wrong?
FYI my name is Manraj and I am the only user on my mac (hence I am an admin) so that is why it appears in the code as Manrajs MBP as that is the name of my laptop.
Last login: Tue Jun 21 15:35:36 on ttys000
[manrajsandhu@Manrajs-MBP~ % node
v16.15.1
(manrajsandhu@Manrajs-MBP ~ % pm itstall -g @angular/cli
pm WARN config global
--global
--local
are deprecated. Use
npm
ERRII
code EACCES
npm
ERR syscall rename
npm
RR
path /usr/local/lib/node_modules/@angular/cli
npm
ERR
dest /usr/local/lib/node modules/@angular/.cli-G39XYeT9
AR
errno -13
-location=global
instead.
npm
nom
PRR
non
SRR
npm
npm
-RR
•RR
npm
RR
npm
nom
ERR
ERD
nom
RR
Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@angular/cli'
->
[Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@angular/cli'
"/usr/local/lib
errno: -13,
"/usr/local/1
code: 'EACCES
syscall: 'rename'
path: '/usr/local/lib/node_modules/@angular/cli
dest:'/usr/local/lib/node_modules/Cangular/.cli-639XYeT9'
npm
ERR
npm
ERRI
npm
ERRI
npm
ERR
The operation was rejected by your operating system
It is likely you do not have the permissions to access this file as the current user
npm
RR
npm
ERR
npm
If you believe this might be a permissions issue, please double-check the
permissions of the file and its containing directories,
the command again as root/Administrator
or try running
nom
ERRII
mpm
EDD
A complete log of this run can be found in:
/Users/manrajsandhu/.npm/_logs/2022-06-21T14_36_16_571Z-debug-0.10g
manrajsandhu@Manrajs-MBP
%
Solution
You need root privileges. Just use sudo
.
sudo npm install -g @angular/cli
Answered By - piotreknow Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.