zoukankan      html  css  js  c++  java
  • cordova plugin add出现CERT_UNTRUSTED错误解决方法

    介绍

               目前使用ionic+cordova完成hybmid app开发,在安装geolocation插件时爆出来一个莫名的错误:

    Fetching from npm failed: CERT_UNTRUSTED
    Error: CERT_UNTRUSTED
        at SecurePair.<anonymous> (tls.js:1367:32)
        at SecurePair.emit (events.js:92:17)
        at SecurePair.maybeInitFinished (tls.js:979:10)
        at CleartextStream.read [as _read] (tls.js:471:13)
        at CleartextStream.Readable.read (_stream_readable.js:340:10)
        at EncryptedStream.write [as _write] (tls.js:368:25)
        at doWrite (_stream_writable.js:225:10)
        at writeOrBuffer (_stream_writable.js:215:5)
        at EncryptedStream.Writable.write (_stream_writable.js:182:11)
        at write (_stream_readable.js:601:24)

             原因是因为我自己重新设置了npm仓库为淘宝的npm镜像仓库,由于某些安全原因无法获取cordova的相关插件,解决办法很简单:

    npm config set strict-ssl false

    以上。

  • 相关阅读:
    使用jxl.jar操作Excel
    ThreadLocal学习
    ArrayList与Vector、HashMap与HashTable
    String, StringBuffer, StringBuilder比较
    ArrayList与LinkedList实现比较
    Java文件备份类
    Maven安装与更新
    Eclipse安装反编译工具JadClipse
    Linux关闭防火墙
    Hadoop简介
  • 原文地址:https://www.cnblogs.com/accordion/p/4539241.html
Copyright © 2011-2022 走看看