【问题标题】:@microsoft/mgt Graph toolkit Compilation error after migrating from Angular 11 to Angular 13@microsoft/mgt Graph toolkit 从 Angular 11 迁移到 Angular 13 后出现编译错误
【发布时间】:2022-07-04 17:57:41
【问题描述】:

我在我的 Angular 11 应用程序中使用了 Microsoft 工具包。一切正常。然后我被要求升级到 Angular 13。即使使用最新版本的工具包(截至本文为 2.3.2),我也会遇到编译错误。错误在库本身,而不是在应用程序中。所有错误似乎都指向它的依赖项之一,microsoft/fast-foundation

我只使用:

<mgt-person person-query="me" view="oneline"></mgt-person>

我在应用组件中设置了它:

Providers.globalProvider = new Msal2Provider({
                clientId: authConfig.azureClintId,
                authority: authConfig.azureTenantId
            });

但是编译器会抛出很多这样的错误:

Error: node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6358:26 - error TS2320: Interface 'TextField' cannot simultaneously extend types 'FormAssociatedTextField' and 'DelegatesARIATextbox'.
  Named property 'ariaBusy' of types 'FormAssociatedTextField' and 'DelegatesARIATextbox' are not identical.

6358 export declare interface TextField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~


Error: node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6358:26 - error TS2320: Interface 'TextField' cannot simultaneously extend types 'FormAssociatedTextField' and 'DelegatesARIATextbox'.
  Named property 'ariaDisabled' of types 'FormAssociatedTextField' and 'DelegatesARIATextbox' are not identical.

6358 export declare interface TextField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~


Error: node_modules/@microsoft/fast-foundation/dist/fast-foundation.d.ts:6358:26 - error TS2320: Interface 'TextField' cannot simultaneously extend types 'FormAssociatedTextField' and 'DelegatesARIATextbox'.
  Named property 'ariaHidden' of types 'FormAssociatedTextField' and 'DelegatesARIATextbox' are not identical.

6358 export declare interface TextField extends StartEnd, DelegatesARIATextbox {
                              ~~~~~~~~~

有没有人可以解决这个问题?你知道吗?

谢谢

【问题讨论】:

  • 删除你的 node_modules repo 和 npm install
  • 谢谢,但我已经多次这样做了,但没有效果

标签: angular typescript microsoft-graph-toolkit


【解决方案1】:

在您的 tsconfig.json 文件中设置以下内容。

{
  "skipLibCheck": true
}

【讨论】:

    猜你喜欢
    • 2020-05-28
    • 2022-08-11
    • 2021-12-15
    • 1970-01-01
    • 2021-09-13
    • 1970-01-01
    • 2022-08-17
    • 2020-06-15
    • 1970-01-01
    相关资源
    最近更新 更多