【问题标题】:Node Js: Error - Unable to verify leaf signature when installing Express FrameworkNode Js:错误 - 安装 Express Framework 时无法验证叶签名
【发布时间】:2015-11-05 04:51:11
【问题描述】:

我需要为我的应用程序安装 Express Framework。
这是我得到的错误。我尝试将我的计算机的 Environment varaibales 设置为 http 和 https 的 http://username:password@proxy:port

另外,我也试过

之类的代码
npm config set proxy http://username:password@proxy:port -g
npm config set https-proxy http://username:password@proxy:port -g
npm config set strict-ssl false.

即使这样我也收到以下错误。

 npm ERR! node v0.12.7
    npm ERR! npm  v2.11.3
    npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE

    npm ERR! unable to verify the first certificate
    npm ERR!
    npm ERR! If you need help, you may report this error at:
    npm ERR!     <https://github.com/npm/npm/issues>

    npm ERR! Please include the following file with any support request:

任何有关安装 Express Framework 的帮助将不胜感激。

【问题讨论】:

标签: node.js express


【解决方案1】:

我也遇到了同样的问题,但你的最后一个选择,即

npm config set strict-ssl false 为我工作。

在命令提示符下运行此命令后,我使用以下命令安装了 express 框架:

npm install -g express-generator

【讨论】:

    【解决方案2】:

    即使我在安装 angular cli 时也遇到了同样的错误... 我在 cmd 中使用了命令“npm config set strict-ssl false”,然后使用 npm install -g @angular/cli 安装...它工作...谢谢

    【讨论】:

      【解决方案3】:

      npm config set strict-ssl false 应该修复它。

      【讨论】:

      • 你能解释一下为什么吗?
      【解决方案4】:

      在我的情况下,它是在 docker 环境中,我没有将包含 sstrict-ssl false 指令的 .yarnrc 复制到构建阶段的映像中。

      【讨论】:

        【解决方案5】:

        问题:

        >npm install
        npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
        npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
        npm ERR! request to https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.6.tgz failed, reason: unable to verify the first certificate
        

        解决方案:

        npm install 执行此命令后生效:

        npm config set strict-ssl false
        

        【讨论】:

          猜你喜欢
          • 2013-12-03
          • 1970-01-01
          • 1970-01-01
          • 2015-11-15
          • 2015-10-13
          • 1970-01-01
          • 2021-09-22
          • 1970-01-01
          相关资源
          最近更新 更多