【发布时间】:2020-12-24 20:16:38
【问题描述】:
最近有人提示我使用 npm install -g npm 安装 NPM 补丁,但此过程失败。以下是错误消息的摘录。
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules
和
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
使用 sudo 安装补丁是否安全?如果不是,这个问题的正确解决方法是什么?
【问题讨论】:
标签: npm npm-install sudo