我如何撤消NPM Eaccess(潜在的)危险解决方案?

发布于 2025-02-13 01:24:35 字数 472 浏览 0 评论 0原文

昨天我尝试通过NPM安装纱线,但是为EACCES ERRNO -13消息提供了。

我关注本指南建议在erminal:> 中建议进行2个修复程序:

  1. > sudo chown -r $(whoami)〜/.npm
  2. sudo chown -r $(whoami) /usr/local/lib/node_modules/

在修复问题的同时,本文的评论部分表明此修复程序有点危险(我只在更改后才看到评论)。如何撤消昨天进行的2个更改,以便找到替代/更安全的解决方案?

Yesterday I tried installing yarn via npm, however was provided with an EACCES errno -13 message.

I followed this guide that recommended 2 fixes in Terminal:

  1. sudo chown -R $(whoami) ~/.npm
  2. sudo chown -R $(whoami) /usr/local/lib/node_modules/

Whilst they fixed the issue, the comments section of the article indicate this fix is a bit dangerous (I only saw the comments after I had made the changes). How can I undo the 2 changes that I made yesterday so I can find an alternative/safer solution?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文