npm ERR! errno -13具体问题处理

npm ERR! errno -13具体问题处理

出现问题的报错

npm ERR! code EACCES
npm ERR! syscall open
npm ERR! path /Users/xxxx/.npm/_cache/index-v5/c6/06/xxxxx
npm ERR! errno -13
npm ERR! 
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR! 
npm ERR! To permanently fix this problem, please run:
npm ERR!   sudo chown -R 501:20 "/Users/xxx/.npm"

问题原因

  • 没有给默认的.npm/_cache

解决方案1:

  • 使用对应推荐命令对于默认文件夹开放权限sudo chown -R 501:20 "/Users/xxx/.npm"

解决方案2

  • 修改默认缓存文件夹地址npm config set cache "您的路径"

你可能感兴趣的:(node,npm,arcgis,前端,errno)