将构建文件上传到Firebase主机后,Ionic会抛出错误
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将构建文件上传到Firebase主机后,Ionic会抛出错误相关的知识,希望对你有一定的参考价值。
我想在浏览器上上传离子网络应用程序。我使用ionic build browser --prod --release
代码成功构建。然后我使用firebase deploy
部署应用程序该应用程序也成功上传。现在,当我尝试登录时,它在浏览器控制台中显示错误
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'call' of undefined
TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (main.js:50)
at eval (C:/Users/allud/Code/webApp/src_lazy:44)
at t.invoke (polyfills.js:3)
at Object.onInvoke (C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4354)
at t.invoke (polyfills.js:3)
at r.run (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4345)
at t.invokeTask (polyfills.js:3)
at __webpack_require__ (main.js:50)
at eval (C:/Users/allud/Code/webApp/src_lazy:44)
at t.invoke (polyfills.js:3)
at Object.onInvoke (C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4354)
at t.invoke (polyfills.js:3)
at r.run (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4345)
at t.invokeTask (polyfills.js:3)
at c (polyfills.js:3)
at Object.reject (polyfills.js:3)
at NavControllerBase._fireError (C:/Users/allud/Code/webApp/node_modules/ionic-angular/navigation/nav-controller-base.js:327)
at NavControllerBase._failed (C:/Users/allud/Code/webApp/node_modules/ionic-angular/navigation/nav-controller-base.js:315)
at eval (C:/Users/allud/Code/webApp/node_modules/ionic-angular/navigation/nav-controller-base.js:370)
at t.invoke (polyfills.js:3)
at Object.onInvoke (C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4354)
at t.invoke (polyfills.js:3)
at r.run (polyfills.js:3)
at polyfills.js:3
defaultErrorLogger @ C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:1289
ErrorHandler.handleError @ C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:1349
IonicErrorHandler.handleError @ C:/Users/allud/Code/webApp/node_modules/ionic-angular/util/ionic-error-handler.js:65
next @ C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4983
schedulerFn @ C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4056
SafeSubscriber.__tryOrUnsub @ C:/Users/allud/Code/webApp/node_modules/rxjs/Subscriber.js:238
SafeSubscriber.next @ C:/Users/allud/Code/webApp/node_modules/rxjs/Subscriber.js:185
Subscriber._next @ C:/Users/allud/Code/webApp/node_modules/rxjs/Subscriber.js:125
Subscriber.next @ C:/Users/allud/Code/webApp/node_modules/rxjs/Subscriber.js:89
Subject.next @ C:/Users/allud/Code/webApp/node_modules/rxjs/Subject.js:55
EventEmitter.emit @ C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4042
NgZone.triggerError @ C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4414
onHandleError @ C:/Users/allud/Code/webApp/node_modules/@angular/core/@angular/core.es5.js:4375
t.handleError @ polyfills.js:3
r.runGuarded @ polyfills.js:3
(anonymous) @ polyfills.js:3
n.microtaskDrainDone @ polyfills.js:3
o @ polyfills.js:3
Promise resolved (async)
r @ polyfills.js:3
t.scheduleTask @ polyfills.js:3
onScheduleTask @ polyfills.js:3
t.scheduleTask @ polyfills.js:3
r.scheduleTask @ polyfills.js:3
r.scheduleMicroTask @ polyfills.js:3
f @ polyfills.js:3
c @ polyfills.js:3
(anonymous) @ polyfills.js:3
webpackJsonpCallback @ main.js:22
(anonymous) @ 1.main.js:1
有谁可以告诉问题是什么?
答案
使用最新版本更新CLI,然后再次构建应用程序。现在工作正常。
以上是关于将构建文件上传到Firebase主机后,Ionic会抛出错误的主要内容,如果未能解决你的问题,请参考以下文章
将文件从 angular ionic 上传到本地主机中的 slim php 框架
拍摄照片后,Ionic cordova 相机插件间歇性崩溃(使用 Firebase 图像上传)
Google Firebase iOS 构建将文件上传到 Mac 上的存储,但在 iPad 上运行时触发 StorageException