将Monorepo angular 8应用程序部署到Firebase时出现rxjs错误

时间:2019-10-22 06:53:49

标签: angular firebase deployment rxjs

我有一个包含2个Angular 8应用程序的monorepo,我正尝试使用新的deploy CLI功能将其中一个部署到Firebase。当我计划在该项目上容纳多个应用程序时,我想摆脱src文件夹中的一个应用程序,以便所有应用程序都位于projects文件夹下。

部署过程在src/文件夹中的应用程序上运行良好,但在projects/app文件夹中的应用程序上失败。

如何复制:

ng new project
cd project
ng g application app
ng add @angular/fire

然后在defaultProject中将app设置为angular.json并根据https://github.com/angular/angularfire/issues/2088#issuecomment-529192788修复原理图

运行

ng deploy

可以很好地构建应用程序(ng build --prod也不会引发错误),但是紧接着,将发生以下错误:

C:\workspace\jdr\node_modules\rxjs\internal\util\hostReportError.js:4
setTimeout(function () { throw err; });                         ^

TypeError: entry.message.split is not a function
at MapSubscriber.IndentLogger._observable._observable.pipe.operators_1.map.entry [as project] (C:\workspace\jdr\node_modules\@angular-devkit\core\src\logger\indent.js:34:58)
at MapSubscriber._next (C:\workspace\jdr\node_modules\rxjs\internal\operators\map.js:49:35)
at MapSubscriber.Subscriber.next (C:\workspace\jdr\node_modules\rxjs\internal\Subscriber.js:66:18)
at Subject.next (C:\workspace\jdr\node_modules\rxjs\internal\Subject.js:60:25)
at IndentLogger.next (C:\workspace\jdr\node_modules\@angular-devkit\core\src\logger\logger.js:79:23)
at SafeSubscriber.job.getChannel.subscribe.entry [as _next] (C:\workspace\jdr\node_modules\@angular-devkit\architect\src\schedule-by-name.js:46:16)
at SafeSubscriber.__tryOrUnsub (C:\workspace\jdr\node_modules\rxjs\internal\Subscriber.js:207:16)
at SafeSubscriber.next (C:\workspace\jdr\node_modules\rxjs\internal\Subscriber.js:145:22)
at Subscriber._next (C:\workspace\jdr\node_modules\rxjs\internal\Subscriber.js:89:26)
at Subscriber.next (C:\workspace\jdr\node_modules\rxjs\internal\Subscriber.js:66:18)
at MergeMapSubscriber.notifyNext (C:\workspace\jdr\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
at InnerSubscriber._next (C:\workspace\jdr\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
at InnerSubscriber.Subscriber.next (C:\workspace\jdr\node_modules\rxjs\internal\Subscriber.js:66:18)
at MapSubscriber._next (C:\workspace\jdr\node_modules\rxjs\internal\operators\map.js:55:26)
at MapSubscriber.Subscriber.next (C:\workspace\jdr\node_modules\rxjs\internal\Subscriber.js:66:18)
at FilterSubscriber._next (C:\workspace\jdr\node_modules\rxjs\internal\operators\filter.js:52:30)

环境:

Window 10

@angular: 8.2.10
@angular/fire: 5.2.1
@angular/cli: 8.3.9
rxjs: 6.4.0

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,但是当我使用ng buildfirebase deploy而不是使用ng deploy时,它消失了。