我有一个包含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
答案 0 :(得分:0)
我遇到了同样的问题,但是当我使用ng build
和firebase deploy
而不是使用ng deploy
时,它消失了。