Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Permission denied when running npm install #90

Open
jwenjian opened this issue Aug 17, 2019 · 0 comments
Open

Permission denied when running npm install #90

jwenjian opened this issue Aug 17, 2019 · 0 comments

Comments

@jwenjian
Copy link
Owner

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

@jwenjian jwenjian changed the title Bug fix: Permission denied when running npm install Permission denied when running npm install Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant