This repository was archived by the owner on Sep 6, 2023. It is now read-only.
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
Open
Description
If an exception occurred when running npm install
, like below:
npm ERR! Error: EACCES: permission denied, mkdir '/Users/xxxxx/.npm/_cacache/index-v5/ad/a1'
npm ERR! { [Error: EACCES: permission denied, mkdir '/Users/
xxxxx/.npm/_cacache/index-v5/ad/a1']
npm ERR! cause:
npm ERR! { Error: EACCES: permission denied, mkdir '/Users/x x x xx/.npm/_cacache/index-v5/ad/a1'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/Users/xxxxx/.npm/_cacache/index-v5/ad/a1' },
npm ERR! isOperational: true,
Run below command:
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
Then run npm install
again.
Refer to: https://www.jianshu.com/p/60b3d5584afe