节点Js:错误 - 安装Express Framework时无法验证叶签名

时间:2015-08-12 14:06:36

标签: node.js express

我需要为我的应用程序安装Express Framework 这是我得到的错误。我试图为我的计算机设置环境varaibales,对于http和https,为http://username:password@proxy:port npm。

另外,我尝试过像

这样的代码
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的任何帮助将不胜感激。

5 个答案:

答案 0 :(得分:8)

我也面临同样的问题,但是你的最后一个选择,即

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

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

npm install -g express-generator

答案 1 :(得分:0)

即使我在安装角度客户端时遇到了同样的错误... 我已经在cmd中使用了命令“ npm config set strict-ssl false”,然后使用npm install -g @ angular / cli安装了它。。。

答案 2 :(得分:0)

npm config set strict-ssl false应该解决它。

答案 3 :(得分:0)

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

答案 4 :(得分:0)

问题:

>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