更新23/11/2018目前,我已经做了
yarn config set cache-folder /usr/local/Caches/yarn一旦我运行了yarn install --check-files,我就会得到错误:
error An unexpected error occurred: "EACCES: permission denied, mkdir '/usr/local/Caches'".由此,我试着做了chmod -R 755 /usr/local/Caches/yarn
我得到了chmod: cannot access '/usr/local/Caches/yarn': No such file or directory
更新23/11/2018
还有,我做了mkdir -p ~/home/james/.cache/yarn然后做了chmod -R 755 ~/home/james/.cache/yarn
然后我得到错误:
error An unexpected error occurred: "EACCES: permission denied, mkdir '/usr/local/Caches'".我做过:chmod -R 755 /usr/local/Caches
然后得到:chmod: cannot access '/usr/local/Caches': No such file or directory
所以,到目前为止,我所做的方法还没有解决我的问题。
当我试图“修复”我的纱线宝石安装和安装webpacker时,我得到了这个错误。
“警告跳过首选缓存文件夹”/home/james/. cache /cache“,因为它不可写。”
我知道我需要使用chmod更改目录权限。
但是,当我尝试这样做时,使用:
chmod -R 755 /home/james/.cache/yarn有人告诉我,没有找到/home/james/..cache/yarn目录。
那么,如何才能确切地更改这个目录的权限呢?
附加信息:我正在运行Windows 10,我实际上是在Windows上使用Ubuntu,所以可以访问我的文件夹。我使用Ubuntu并编写:
james@DESKTOP-VP0F0PN:~$ cd /mnt/c/users/james/documents/github/personalwebsite然后在此之后输入上述chmod代码。此外,要运行服务器:
james@DESKTOP-VP0F0PN:/mnt/c/users/james/documents/github/personalwebsite$ rails s发布于 2018-11-22 08:09:00
也许你一开始就需要创建那个目录?试一试
mkdir -p /home/james/.cache/yarn然后再检查纱线的安装情况。根据@jay评论更新
https://stackoverflow.com/questions/53367214
复制相似问题