生成Prisma时的错误: - EACCES:拒绝权限,需要复制文件

发布于 2025-02-05 18:12:43 字数 585 浏览 1 评论 0原文

When I run npx prisma generate, I get the below error:

Error: EACCES: permission denied, copyfile '/Users//.cache/prisma/master/1a2506facaf1a4727b7c26850735e88ec779dee9/darwin /libquery -engine' - > '/users/< me>/< my-project>/node_modules/prisma/libquery_engine-darwin.dylib.node'

我已经从github源重新串起了该项目离开。 我之前所做的是删除node_modules文件夹,因为我想重新安装它(这可能是问题)。

我应该只是删除.cache内的prisma吗?我不确定为什么我需要执行复制文件命令以及如何解决此问题?

非常感谢!

PS:命令的完整序列:sudo纱线安装,启动postgres的docker,然后prisma生成上面的命令。

When I run npx prisma generate, I get the below error:

Error: EACCES: permission denied, copyfile '/Users/<me>/.cache/prisma/master/1a2506facaf1a4727b7c26850735e88ec779dee9/darwin/libquery-engine' -> '/Users/<me>/<my-project>/node_modules/prisma/libquery_engine-darwin.dylib.node'

I have re-cloned the project from Github source, but this error doesn't go away.
What I previously did is deleting the node_modules folder because I want to re-install it (this could be the problem).

Should I just delete the prisma inside of the .cache? I am not sure why I need to do the copy file command and how can I fix this issue?

Thanks so much in advance!

ps: full sequence of commands: sudo yarn install, start docker for postgres, then the prisma generate command above.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撑一把青伞 2025-02-12 18:12:44

正确的是:

chown -R node:node node_modules/.prisma

The correct is:

chown -R node:node node_modules/.prisma
野侃 2025-02-12 18:12:44

这似乎是一个许可错误。您可以通过更改Node_modules/.prisma文件夹的所有权从docker容器中的default一个将其修复。

chown -R node_modules/.prisma node:node

It seems like a permission error. You could fix it by changing the ownership of the node_modules/.prisma folder from the root to the default one in your docker container.

chown -R node_modules/.prisma node:node
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文