小编dav*_*oli的帖子

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

我已经在我的应用程序中安装了@ngx-translate/core版本 14.0.0 和@ngx-translate/http-loader版本 ^7.0.0,并遵循了一些关于如何向 Angular 站点添加多种语言的教程(例如this )。我的 Angular 版本是 11.2.10。

\n

当我成功完成所有步骤后,出现此错误。我尝试了多种方法,例如更新版本,但都没有解决问题。

\n

有谁知道如何解决这个问题?

\n
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 \'\xc9\xb5\xc9\xb5FactoryDeclaration\'.\n34     static \xc9\xb5fac: i0.\xc9\xb5\xc9\xb5FactoryDeclaration<FakeMissingTranslationHandler, never>;\n                       ~~~~~~~~~~~~~~~~~~~~\nError: 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 \'\xc9\xb5\xc9\xb5InjectableDeclaration\'.\n35     static \xc9\xb5prov: i0.\xc9\xb5\xc9\xb5InjectableDeclaration<FakeMissingTranslationHandler>;\n                        ~~~~~~~~~~~~~~~~~~~~~~~\nError: 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 \'\xc9\xb5\xc9\xb5FactoryDeclaration\'.\n12     static \xc9\xb5fac: i0.\xc9\xb5\xc9\xb5FactoryDeclaration<TranslateFakeCompiler, never>;\n                       ~~~~~~~~~~~~~~~~~~~~\nError: 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 \'\xc9\xb5\xc9\xb5InjectableDeclaration\'.\n13 …
Run Code Online (Sandbox Code Playgroud)

npm typescript ngx-translate angular

6
推荐指数
1
解决办法
7573
查看次数

标签 统计

angular ×1

ngx-translate ×1

npm ×1

typescript ×1