【问题标题】:What is the meaning of this error (protobufjs@6.11.2 postinstall: `node scripts/postinstall`)?这个错误是什么意思(protobufjs@6.11.2 postinstall: `node scripts/postinstall`)?
【发布时间】:2021-07-24 16:16:25
【问题描述】:

嗨,我正在使用 npm install --save firebase 在 ubuntu 控制台上安装 firebase 并在安装过程中出现以下错误, 我尝试安装npm install protobufjs@6.11.2 以试图摆脱错误,但它没有工作。 错误是什么意思?

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! protobufjs@6.11.2 postinstall: `node scripts/postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protobufjs@6.11.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

【问题讨论】:

    标签: node.js ubuntu npm windows-subsystem-for-linux


    【解决方案1】:

    我不确定为什么会发生此错误,但我的理解是它与某种权限问题有关。

    你可以通过前缀Sudo

    来解决这个错误

    sudo npm install --save firebas

    【讨论】:

      【解决方案2】:

      npm 尝试不以 root 身份运行 protobuff 安装后脚本,当您尝试使用“sudo”命令以 root 身份运行它时,npm 将尝试阻止它。所以你需要在安装时使用 --unsafe-perm 标志。所以完整的命令看起来像 sudo npm install --unsafe-perm -g firebase

      【讨论】:

        猜你喜欢
        • 2021-02-18
        • 1970-01-01
        • 2020-03-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多