美文网首页
Ionic 安装插件的时候报错

Ionic 安装插件的时候报错

作者: 浪尖儿 | 来源:发表于2016-08-17 18:29 被阅读0次

    下图来自 Ionic In Action,这是本非常罕有的讲解Ionic框架的书,当然内容也非常的受用!

    cordova-plugin.png

    照着上面的命令进行安装,却发现报了这个错误:

    Ionic package Error: Registry returned 404 for GET on https://registry.npmjs.org/org.apache.cordova.file
    

    类似的情况,Google了半天,才发现是因为插件改名了好像,不过不知道为什么文档中也不通知。。。。还好有先驱已经踩过这样的坑。

    下面的解决方法就先凑合用吧:

    I had this and to resolve it I edited the package.json file and changed:

    "cordovaPlugins": [
    ...
    "org.apache.cordova.inappbrowser",
    ...
    ]
    

    to

    "cordovaPlugins": [
    ...
    "cordova-plugin-inappbrowser",
    ...
    ]
    

    原来,改下名字就行了。还有,如果从命令行安装的话,要这么敲:

    cordova plugin add cordova-plugin-inappbrowser
    

    参考:

    https://forum.ionicframework.com/t/solved-ionic-package-error-registry-returned-404-for-get-on-https-registry-npmjs-org-org-apache-cordova-file/48489

    相关文章

      网友评论

          本文标题:Ionic 安装插件的时候报错

          本文链接:https://www.haomeiwen.com/subject/dqnmsttx.html