angular - 安装 'cordova-plugin-firebase' 失败:CordovaError: Using "requireCordovaModule" to load non-cordova
问题描述
我正在尝试在我的应用程序(ionic V-4)中执行phone authentication
使用。创建应用程序后,我只是使用以下命令添加了平台:firebase
android/ios
ionic cordova platform add android
ionic cordova platform add ios
然后尝试像这样安装firebase插件:
ionic cordova plugin add cordova-plugin-firebase
它抛出这个错误:
我正在开发应用程序windows
。
解决方案
You are using cordova 9, and in that version requireCordovaModule
was deprecated for non cordova modules and thats why you get the following error.
You need to navigate to the following js file in your environment:
https://github.com/arnesson/cordova-plugin-firebase/blob/master/scripts/ios/helper.js#L33
and change:
var xcode = context.requireCordovaModule("xcode");
into this ( since xcode is an npm package):
var xcode = require("xcode");
推荐阅读
- javascript - nunjucks:错误:找不到模板,目录问题
- android - 无需在真实设备上运行测试的 UI 测试
- angular - 如何初始化 Angular 基于角色的安全性?
- java - 无法播放路径中的视频 (/storage/emulated/0/Android/data/com...)
- python - 如何在scrapy中添加一个描述值来自哪个链接的值
- node.js - Angular Node.js CPanel 部署
- wso2 - 如何根据公共修复的更改应用 WSO2 安全咨询修复
- vue.js - (NUXT) 如何在甜蜜警报 2 中添加组件
- kubernetes - Kubernetes nginx入口控制器不转发带有下划线的标头
- reactjs - 功能组件的 Jest 函数调用在刺激点击时会出错