我想将Microsoft Graph Toolkit整合到我的SPFx REACT the部件中,这样我就可以按照https://docs.microsoft.com/en-us/graph/toolkit/get-started中的说明进行操作了
npm install @microsoft/mgt我运行了gulp serve --nobrowser,并得到了错误08:12:12启动子任务'tsc'...08:12:12 typescript version: 3.3.4000 08:12:24在14 s 08:12:26 Error - tsc node_modules/lit-html/ts3.4/lib/parts.d.ts(108,32):error TS1005:';‘后完成子任务'tslint’。08:12:26错误- tsc node_modules/lit-html/ts3.4/lib/parts.d.ts(108,38):错误TS1005:';‘。08:12:26错误- tsc node_modules/lit-html/ts3.4/lib/parts.d.ts(111,67):错误TS1005:',‘。08:12:26错误- tsc node_modules/lit-html/ts3.4/lib/parts.d.ts(111,73):错误TS1005:',‘。08:12:26错误- tsc node_modules/lit-html/ts3.4/lib/template-instance.d.ts(27,29):错误TS1005:',‘。08:12:26错误- tsc node_modules/lit-html/ts3.4/lib/template-instance.d.ts(27,36):错误TS1005:',‘。08:12:26错误- tsc node_modules/lit-html/ts3.4/lib/template-result.d.ts(21,31):错误TS1005:';‘。08:12:26错误- tsc node_modules/lit-html/ts3.4/lib/template-result.d.ts(21,38):错误TS1005:';‘。08:12:26错误- tsc node_modules/lit-html/ts3.4/lib/template-result.d.ts(24,65):错误TS1005:',‘。08:12:26错误- tsc node_modules/lit-html/ts3.4/lib/template-result.d.ts(24,72):错误TS1005:',‘。08:12:26错误- 'tsc‘子任务在15秒后出错,退出时返回代码2
mgt和SPFx 1.10.0之间是否存在打字版本争用?
有没有解决这个问题的办法?
谢谢你的帮助
发布于 2020-07-20 22:41:32
由于没有答案,我也找不到问题的根源,所以我更改了有问题的.d.ts文件。如果任何人感兴趣,请替换\node_modules\lit html\ts3.4\lib中的文件我想上传压缩文件,但无法在此处完成。我可以把它发送给任何想要的人。
发布于 2020-07-21 03:05:07
看起来使用的ts版本与mgt不兼容。尝试升级到您的web部件的TypeScript 3.7或更高版本。您可以在此处查看详细说明:https://developer.microsoft.com/en-us/graph/blogs/a-lap-around-microsoft-graph-toolkit-day-9-microsoft-graph-toolkit-sharepoint-provider/
https://stackoverflow.com/questions/62969188
复制相似问题