gpt4 book ai didi

sharepoint-online - 在 SharePoint online 中使用 SPFx 实现 FluentUI 时出现问题

转载 作者:行者123 更新时间:2023-12-05 04:46:15 30 4
gpt4 key购买 nike

我正在关注 this blog在 SPFX 部分实现 fluentUI,但在执行“Gulp Build”时出现以下错误:

Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupedListSection.d.ts(9,38): error TS1005: ';' expected.      
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupedListSection.d.ts(10,13): error TS1005: '=' expected.
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupedListSection.d.ts(10,33): error TS1005: ';' expected.
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupedListSection.d.ts(11,13): error TS1005: '=' expected.
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupedListSection.d.ts(11,33): error TS1005: ';' expected.
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupedListSection.d.ts(12,13): error TS1005: '=' expected.
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupedListSection.d.ts(12,32): error TS1005: ';' expected.
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupFooter.d.ts(2,13): error TS1005: '=' expected.
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupFooter.d.ts(2,40): error TS1005: ';' expected.
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupFooter.d.ts(4,1): error TS1128: Declaration or statement expected.
[05:38:38] Error - [tsc] node_modules/@fluentui/react/lib/components/GroupedList/GroupFooter.d.ts(4,13): error TS1005: ';' expected
................
.......
.......

最佳答案

刚遇到同样的问题。事实证明,最新版本的 Fluent UI 使用 TypeScript 3.8 语法,因此您需要更新 SPFx 项目使用的版本。详细说明在这里:https://www.voitanos.io/blog/use-different-typescript-versions-in-sharepoint-framework-projects/ .实际上,我已经将我的更新到 @microsoft/rush-stack-compiler-3.9,它现在工作正常。

关于sharepoint-online - 在 SharePoint online 中使用 SPFx 实现 FluentUI 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68890597/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com