在遵循nativescript-plugin自述文件中提到的步骤后,我将得到此错误。
JS: firebase.init错误: TypeError:无法读取未定义的属性“数据库”
https://github.com/EddyVerbruggen/nativescript-plugin-firebase
但我不太明白,也不知道如何解决这个问题。
使用的插件版本是: 6.4.0和tns 4.1.2
编辑: init代码,来自app.js
var firebase = require("nativescript-plugin-firebase");
firebase.init({ persist: true
// Optionally pass in properties for database, authentication and cloud messaging,
// see their respective docs.
}).then(
function (instance) {
console.log("firebase.init done");
},
function (error) {
console.log("firebase.init error: " + error);
}
);发布于 2018-07-13 16:15:47
我最终通过CLI手动安装插件(我最初通过NativeScript助手安装它)解决了它,显然他们没有考虑到一些插件可能需要一些用户输入的事实,编写特定的配置文件( nativescript- plugin -firebase),所以通过手动安装它,我必须提供所需的用户输入,它得到了配置和工作!
https://stackoverflow.com/questions/51327003
复制相似问题