NPM在安装过程中出现:Unhandled rejection Error EACCES permission denied

前端

Winter

2019-07-17

Unhandled rejection Error: EACCES: permission denied, open '/Users/yld/.npm/_cacache/index-v5/a7/80/54166f62863511a69247af817869d4d5b8b460b7deb990eafca09bd3dbb6'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/yld/.npm/_logs/2019-07-16T07_02_11_947Z-debug.log

第119篇《NPM在安装过程中出现:Unhandled rejection Error EACCES permission denied》来自Winter(https://github.com/aiyld/aiyld.github.io)的站点

1个回答
Winter 2019.08.14

重置npm相关文件夹的权限,并分配给当前用户

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

问题类别

JavaScript Ckeditor Python Webpack TypeScript Vue.js React.js ExpressJS KoaJS CSS Node.js HTML Django 单元测试 PHP Asp.net jQuery Bootstrap IOS Android