Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更新angularCli后编译出现问题_Angular_Angularfire2 - Fatal编程技术网

更新angularCli后编译出现问题

更新angularCli后编译出现问题,angular,angularfire2,Angular,Angularfire2,更改计算机,然后安装最新的angular版本Cli,现在我的项目给我这个错误,我在internet上找不到信息 ERROR in ./node_modules/@angular/fire/messaging/messaging.js 23:40 Module parse failed: Unexpected token (23:40) You may need an appropriate loader to handle this file type. | var _this

更改计算机,然后安装最新的angular版本Cli,现在我的项目给我这个错误,我在internet上找不到信息

ERROR in ./node_modules/@angular/fire/messaging/messaging.js 23:40
Module parse failed: Unexpected token (23:40)
You may need an appropriate loader to handle this file type.
|         var _this = this;
|         if (isPlatformBrowser(platformId)) {
>             var requireMessaging = from(import('firebase/messaging'));
|             this.messaging = requireMessaging.pipe(map(function () { return _firebaseAppFactory(options, nameOrConfig); }), map(function (app) { return app.messaging(); }), runOutsideAngular(zone));
|             this.requestPermission = this.messaging.pipe(switchMap(function (messaging) { return messaging.requestPermission(); }), runOutsideAngular(zone));
在中找到一些信息

看起来问题在于默认AngularService worker不支持AngularFirebaseMessaging

AngularFireMessaging与Angular服务人员不兼容

如果您正在使用AngularService Worker,则当前无法使用AngularFireMessaging。如果您想要此功能,请在任一存储库中提交一个问题。您的备选方案是使用WorkboxJS或仅使用Firebase消息传递服务Worker,详情如下


检查依赖项并逐个解决。主要集中在

  • @angular devkit/build angular
    版本从
    ^0.13.9
    降级到
    ^0.12.4

你解决问题了吗?@Mikki是的,但不完全是,只要删除对
AngularFireMessageModule
y的引用我就没有问题了,现在当我需要使用它时,我希望我没有这个问题,我需要从哪个文件中删除
AngularFireMessageModule
的引用?