如何解决NS7 错误上的 Nativescript Firebase 插件存储功能
升级到 NS7 并更新我的代码导入后,我无法使用 firebase 'firestore' 功能。每当调用任何 firebase 存储功能时,我都会收到:
CONSOLE ERROR: ERROR TypeError: Cannot read property 'listAll' of undefined
同一个应用程序能够成功使用firestore来检索集合和文档,但似乎无法识别存储功能。
app.component.ts
import { firestore,storage } from "@nativescript/firebase";
storage.listAll({
bucket: "gs://appname-xxxx.appspot.com",remoteFullPath: ""
}).then(
function (result) {
console.log(JSON.stringify(result));
},function (error) {
console.log(error);
}
);
firebase.nativescript.json
{
"using_ios": true,"using_android": false,"analytics": true,"firestore": true,"realtimedb": false,"authentication": true,"remote_config": false,"performance_monitoring": false,"external_push_client_only": false,"messaging": false,"in_app_messaging": false,"crashlytics": true,"storage": true,"functions": false,"facebook_auth": true,"google_auth": true,"admob": false,"dynamic_links": false,"ml_kit": false
}
解决方法
试试下面的导入格式
onkeydown = "return ((event.keyCode != 186) && (event.keyCode != 32) && (event.keyCode != 188));"
这将避免“未定义”
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。