【问题标题】:Error While using sp-dialog with react project将 sp-dialog 与 react 项目一起使用时出错
【发布时间】:2018-09-12 12:23:08
【问题描述】:

我有一个正在运行的加载 ListView 的 tsx 文件。该项目加载正常。我运行了以下命令

npm install @microsoft/sp-dialog

然后在 tsx 中添加如下 import 语句。

import { SPHttpClient } from '@microsoft/sp-http';

当我使用 gulp build 时,我收到以下错误。

_Error - typescript - node_modules\@microsoft\sp-dialog\node_modules\@microsoft\sp-core-library\lib\deferredCl ass\DeferredClass.d.ts(25,24): 错误 TS1005: ';'预期。_

我可以看到错误指向 DeferredClass.ts 文件中的 abstract 关键字。我怎样才能解决这个问题?

【问题讨论】:

  • 运行 npm install
  • 你试过@VindhyachalKumar 的回答吗?

标签: spfx


【解决方案1】:

您可能只是将命令和代码输入错误,但如果不是......

你需要删除@和microsoft之间的空格

【讨论】:

    猜你喜欢
    • 2021-02-06
    • 2022-12-16
    • 2018-07-25
    • 2018-11-26
    • 2019-02-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-17
    相关资源
    最近更新 更多