【问题标题】:Error while installing ionic in cmd在 cmd 中安装 ionic 时出错
【发布时间】:2017-07-24 02:05:40
【问题描述】:

我在尝试使用 cmd 安装 ionic 时不断遇到错误

在此之前我已经安装了 Node JS

$ npm install -g cordova ionic
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/cordova failed, reason: self
signed certificate in certificate chain

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\samar_000\AppData\Roaming\npm-cache\_logs\2017-07-
23T10_58_18_779Z-debug.log

【问题讨论】:

    标签: node.js cordova ionic-framework npm


    【解决方案1】:

    试试这个

     npm set strict-ssl false
    

    或者你可以按照here的建议升级你的npm

    【讨论】:

    • 这是一个不安全的解决方法,它不应该是解决方案。我们应该尝试弄清楚为什么一开始就向 OP 提供了错误的证书。通过禁用此功能,您可能会面临 MITM 攻击。
    猜你喜欢
    • 1970-01-01
    • 2017-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-21
    • 2020-10-20
    • 2017-09-12
    • 2014-09-13
    相关资源
    最近更新 更多