node.js 纱线错误“EACCESS:权限被拒绝,扫描目录'/home/ubuntu/.config/yarn/link'”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49529696/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
yarn error "EACCESS: permission denied, scandir '/home/ubuntu/.config/yarn/link'"
提问by Astro Lee
Whenever I try something with yarn on Ubuntu 16.04 server.
每当我在 Ubuntu 16.04 服务器上尝试使用纱线时。
It gives an error.
它给出了一个错误。
I am currently using nodejs v8.10.0
我目前正在使用 nodejs v8.10.0
yarn install v1.5.1
error An unexpected error occurred: "EACCES: permission denied, scandir '/home/ubuntu/.config/yarn/link'".
info If you think this is a bug, please open a bug report with the information provided in "/home/ubuntu/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Anyone know why this is happening?
有谁知道为什么会这样?
回答by James Wong - Reinstate Monica
It's likely a unix permission related problem. There is a solution posted on the dev's github page. Try to run the following command
这可能是一个与 Unix 权限相关的问题。在开发者的 github 页面上发布了一个解决方案。尝试运行以下命令
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
Reference: EACCES: permission denied .config/configstore/bower-github.json #2262
回答by MrVerticalStack
I had this problem as well, I found on another thread that my config folder was owned by root, which created several permissions issues.. I changed owner to my user and this error went away.
我也有这个问题,我在另一个线程上发现我的 config 文件夹归 root 所有,这造成了几个权限问题..我将所有者更改为我的用户,这个错误消失了。
See top answer on this thread Unable to access 'git/attributes'
请参阅此线程上的最佳答案 无法访问“git/attributes”

