纱线EACCES:拒绝许可

问题描述 投票:0回答:1

我设置了一个工作区,但我一直感觉到yarn的权限问题。

error An unexpected error occurred: "EACCES: permission denied, mkdir '/home/code/client/node_modules/cacache/node_modules/mkdirp'".

我唯一的解决方法是删除工作区所有包上的node_modules,这很烦人。

然后我运行 yarn install 再次,一切都很好。第二天我再来,面对同样的问题。

我还得用sudo删除node_modules,这很奇怪。

yarn yarnpkg yarn-workspaces
1个回答
0
投票

试试 sudo chmod 0777 the-project-path,然后 remove the node_modules path and the yarn.lock file. 然后跑纱

© www.soinside.com 2019 - 2024. All rights reserved.