【发布时间】: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