npm 安装@ngx-translate后无法启动Angular网站

68bkxrlz  于 2022-11-14  发布在  Angular
关注(0)|答案(1)|浏览(262)

我已经在我的应用程序中安装了@ngx-translate/core版本14.0.0和@ngx-translate/http-loader版本^7.0.0,并遵循了一些教程(例如this)如何将多语言添加到一个Angular 网站。我的Angular 版本是11.2.10。
在我成功地完成了所有步骤后,这个错误出现了。我已经尝试了很多事情,比如更新版本,但是没有一个解决了这个问题。
有人知道怎么解决这个问题吗?

Error: node_modules/@ngx-translate/core/lib/missing-translation-handler.d.ts:34:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
34     static ɵfac: i0.ɵɵFactoryDeclaration<FakeMissingTranslationHandler, never>;
                       ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/missing-translation-handler.d.ts:35:22 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.
35     static ɵprov: i0.ɵɵInjectableDeclaration<FakeMissingTranslationHandler>;
                        ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.compiler.d.ts:12:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
12     static ɵfac: i0.ɵɵFactoryDeclaration<TranslateFakeCompiler, never>;
                       ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.compiler.d.ts:13:22 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.
13     static ɵprov: i0.ɵɵInjectableDeclaration<TranslateFakeCompiler>;
                        ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.directive.d.ts:24:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
24     static ɵfac: i0.ɵɵFactoryDeclaration<TranslateDirective, never>;
                       ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.directive.d.ts:25:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵDirectiveDeclaration'.
25     static ɵdir: i0.ɵɵDirectiveDeclaration<TranslateDirective, "[translate],[ngx-translate]", never, { "translate": "translate"; "translateParams": "translateParams"; }, {}, never>;
                       ~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.loader.d.ts:11:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.[[39m0m
11     static ɵfac: i0.ɵɵFactoryDeclaration<TranslateFakeLoader, never>;
                       ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.loader.d.ts:12:22 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.
12     static ɵprov: i0.ɵɵInjectableDeclaration<TranslateFakeLoader>;
                        ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.parser.d.ts:24:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
24     static ɵfac: i0.ɵɵFactoryDeclaration<TranslateDefaultParser, never>;
                       ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.parser.d.ts:25:22 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.
25     static ɵprov: i0.ɵɵInjectableDeclaration<TranslateDefaultParser>;
                        ~~~~~~~~~~~~~~~~~~~~~~~
[0[39mm
Error: node_modules/@ngx-translate/core/lib/translate.pipe.d.ts:22:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
22     static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
                       ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.pipe.d.ts:23:22 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵPipeDeclaration'.
23     static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate">;
                        ~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.pipe.d.ts:24:22 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.
24     static ɵprov: i0.ɵɵInjectableDeclaration<TranslatePipe>;
                        ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.service.d.ts:190:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
190     static ɵfac: i0.ɵɵFactoryDeclaration<TranslateService, never>;
                        ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/lib/translate.service.d.ts:191:22 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.
191     static ɵprov: i0.ɵɵInjectableDeclaration<TranslateService>;
                         ~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/public_api.d.ts:32:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
32     static ɵfac: i0.ɵɵFactoryDeclaration<TranslateModule, never>;
                       ~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/public_api.d.ts:33:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
33     static ɵmod: i0.ɵɵNgModuleDeclaration<TranslateModule, [typeof i1.TranslatePipe, typeof i2.TranslateDirective], never, [typeof i1.TranslatePipe, typeof i2.TranslateDirective]>;
                       ~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@ngx-translate/core/public_api.d.ts:34:21 - error TS2694: Namespace '"/home/tk18d/Desktop/archivdatenbank/source/frontend-ng/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
34     static ɵinj: i0.ɵɵInjectorDeclaration<TranslateModule>;
                       ~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@six/ui-library/dist/types/components/six-root/six-root.d.ts:22:19 - error TS2304: Cannot find name 'ResizeObserver'.
22   resizeObserver: ResizeObserver;
                     ~~~~~~~~~~~~~~
Error: node_modules/@six/ui-library/dist/types/components/six-tab-group/six-tab-group.d.ts:30:19 - error TS2304: Cannot find name 'ResizeObserver'.
30   resizeObserver: ResizeObserver;
                     ~~~~~~~~~~~~~~
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1139:11-31
Can't import the named export 'ChangeDetectorRef' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1168:12-32
Can't import the named export 'ChangeDetectorRef' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1318:11-31
Can't import the named export 'ChangeDetectorRef' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1352:12-32
Can't import the named export 'ChangeDetectorRef' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1157:10-19
Can't import the named export 'Directive' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1137:11-24
Can't import the named export 'ElementRef' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1166:12-25
Can't import the named export 'ElementRef' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 327:35-47
Can't import the named export 'EventEmitter' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 335:28-40
Can't import the named export 'EventEmitter' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 343:35-47
Can't import the named export 'EventEmitter' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 376:36-48
Can't import the named export 'EventEmitter' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 377:29-41
Can't import the named export 'EventEmitter' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 378:36-48
Can't import the named export 'EventEmitter' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 936:14-20
Can't import the named export 'Inject' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 942:14-20
Can't import the named export 'Inject' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 948:14-20
Can't import the named export 'Inject' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 954:14-20
Can't import the named export 'Inject' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 39:10-20
Can't import the named export 'Injectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 76:10-20
Can't import the named export 'Injectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 259:10-20
Can't import the named export 'Injectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 300:10-20
Can't import the named export 'Injectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 920:10-20
Can't import the named export 'Injectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1339:10-20
Can't import the named export 'Injectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 348:22-36
Can't import the named export 'InjectionToken' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 349:29-43
Can't import the named export 'InjectionToken' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 350:29-43
Can't import the named export 'InjectionToken' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 351:23-37
Can't import the named export 'InjectionToken' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1173:12-17
Can't import the named export 'Input' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1176:12-17
Can't import the named export 'Input' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1457:10-18
Can't import the named export 'NgModule' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1341:10-14
Can't import the named export 'Pipe' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 725:11-17
Can't import the named export 'concat' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 747:11-17
Can't import the named export 'concat' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 704:43-52
Can't import the named export 'concatMap' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 725:18-23
Can't import the named export 'defer' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 747:18-23
Can't import the named export 'defer' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 656:15-23
Can't import the named export 'forkJoin' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 649:12-24
Can't import the named export 'isObservable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 655:37-49
Can't import the named export 'isObservable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 706:15-27
Can't import the named export 'isObservable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 710:13-25
Can't import the named export 'isObservable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 749:13-25
Can't import the named export 'isObservable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 765:8-20
Can't import the named export 'isObservable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1088:12-24
Can't import the named export 'isObservable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1201:10-22
Can't import the named export 'isObservable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 572:56-59
Can't import the named export 'map' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 656:38-41
Can't import the named export 'map' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 14:11-13
Can't import the named export 'of' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 527:13-15
Can't import the named export 'of' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 545:13-15
Can't import the named export 'of' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 655:75-77
Can't import the named export 'of' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 706:41-43
Can't import the named export 'of' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 710:39-41
Can't import the named export 'of' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 731:15-17
Can't import the named export 'of' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 749:39-41
Can't import the named export 'of' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 571:77-88
Can't import the named export 'shareReplay' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 572:114-125
Can't import the named export 'shareReplay' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 725:95-104
Can't import the named export 'switchMap' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 747:88-97
Can't import the named export 'switchMap' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 503:19-23
Can't import the named export 'take' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 538:19-23
Can't import the named export 'take' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 571:93-97
Can't import the named export 'take' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 572:130-134
Can't import the named export 'take' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 25:10-28
Can't import the named export 'ɵɵFactoryTarget' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 62:10-28
Can't import the named export 'ɵɵFactoryTarget' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 245:10-28
Can't import the named export 'ɵɵFactoryTarget' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 286:10-28
Can't import the named export 'ɵɵFactoryTarget' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 906:10-28
Can't import the named export 'ɵɵFactoryTarget' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1141:10-28
Can't import the named export 'ɵɵFactoryTarget' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1320:10-28
Can't import the named export 'ɵɵFactoryTarget' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1435:10-28
Can't import the named export 'ɵɵFactoryTarget' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1143:26-46
Can't import the named export 'ɵɵdefineDirective' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1322:22-37
Can't import the named export 'ɵɵdefinePipe' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 33:0-27
Can't import the named export 'ɵɵngDeclareClassMetadata' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 70:0-27
Can't import the named export 'ɵɵngDeclareClassMetadata' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 253:0-27
Can't import the named export 'ɵɵngDeclareClassMetadata' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 294:0-27
Can't import the named export 'ɵɵngDeclareClassMetadata' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 914:0-27
Can't import the named export 'ɵɵngDeclareClassMetadata' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1151:0-27
Can't import the named export 'ɵɵngDeclareClassMetadata' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1333:0-27
Can't import the named export 'ɵɵngDeclareClassMetadata' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1451:0-27
Can't import the named export 'ɵɵngDeclareClassMetadata' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 19:27-48
Can't import the named export 'ɵɵngDeclareFactory' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 56:37-58
Can't import the named export 'ɵɵngDeclareFactory' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 239:30-51
Can't import the named export 'ɵɵngDeclareFactory' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 280:29-50
Can't import the named export 'ɵɵngDeclareFactory' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 882:24-45
Can't import the named export 'ɵɵngDeclareFactory' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1129:26-47
Can't import the named export 'ɵɵngDeclareFactory' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1310:21-42
Can't import the named export 'ɵɵngDeclareFactory' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1429:23-44
Can't import the named export 'ɵɵngDeclareFactory' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 27:28-52
Can't import the named export 'ɵɵngDeclareInjectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 64:38-62
Can't import the named export 'ɵɵngDeclareInjectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 247:31-55
Can't import the named export 'ɵɵngDeclareInjectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 288:30-54
Can't import the named export 'ɵɵngDeclareInjectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 908:25-49
Can't import the named export 'ɵɵngDeclareInjectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1327:22-46
Can't import the named export 'ɵɵngDeclareInjectable' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1445:23-45
Can't import the named export 'ɵɵngDeclareInjector' from non EcmaScript module (only default export is available)
Error: ./node_modules/@ngx-translate/core/fesm2015/ngx-translate-core.mjs 1437:23-45
Can't import the named export 'ɵɵngDeclareNgModule' from non EcmaScript module (only default export is available)
4si2a6ki

4si2a6ki1#

您似乎使用了错误的@ngx-translate/core & @ngx-translate/http-loader版本,该版本仅适用于Angular 13,并且不适用于以前的版本。
由于您使用的是Angular 11,因此您必须安装以下版本:

  • @ ngx转换/内核@13.x
  • @ ngx翻译/http加载程序@6.x

请在ngx-translate docs上阅读更多详细信息:https://github.com/ngx-translate/core#installation

相关问题