Trace:TypeError:f.getRuleSeverity不是函数

问题描述 投票:0回答:1

我正在Linux(ubuntu)机器上进行Grafana插件开发。我正在使用的版本是

Grafana:6.3.5

Grafana工具包:6.4.4

Grafana UI:6.3.2

我正在使用React进行插件开发。我从grafana的plugins目录中的React Panel Plugin中克隆了代码。我安装了必需的依赖项和软件包。之后,我使用yarn build构建插件。插件工作正常,并显示在grafana上。

现在,我必须在插件中使用syncFusion库,因为我正在开发一个将显示SmithChart的插件。我通过npm install @syncfusion/ej2-react-charts --save添加了syncFusion程序包。我是从SyncFusion那里得到的。现在,当我使用yarn build构建插件时,出现错误Trace: TypeError: f.getRuleSeverity is not a functionyarn build的完整结果是:

yarn run v1.21.1
$ grafana-toolkit plugin:build
✔ Cleaning
✔ Preparing
✔ Prettier check
⠋ Linting

Trace: TypeError: f.getRuleSeverity is not a function
  at /aedata/ae/grafana/plugins/simple-react-panel/node_modules/@grafana/toolkit/src/cli/tasks/plugin.build.js:179:44
  at Array.forEach (<anonymous>)
  at /aedata/ae/grafana/plugins/simple-react-panel/node_modules/@grafana/toolkit/src/cli/tasks/plugin.build.js:177:34
  at step (/aedata/ae/grafana/plugins/simple-react-panel/node_modules/tslib/tslib.js:136:27)
  at Object.next (/aedata/ae/grafana/plugins/simple-react-panel/node_modules/tslib/tslib.js:117:57)
  at fulfilled (/aedata/ae/grafana/plugins/simple-react-panel/node_modules/tslib/tslib.js:107:62)
  at /aedata/ae/grafana/plugins/simple-react-panel/node_modules/@grafana/toolkit/src/cli/utils/useSpinner.js:24:29
  at step (/aedata/ae/grafana/plugins/simple-react-panel/node_modules/tslib/tslib.js:136:27)
  at Object.throw (/aedata/ae/grafana/plugins/simple-react-panel/node_modules/tslib/tslib.js:117:57)
  at rejected (/aedata/ae/grafana/plugins/simple-react-panel/node_modules/tslib/tslib.js:108:69)
✖ f.getRuleSeverity is not a function
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

我用Google搜索,但找不到任何帮助。我也尝试了npm i lint,但没有成功。可能是什么问题。 syncFusion软件包是否存在问题,因为在syncFusion之前插件已成功构建。

grafana lint
1个回答
0
投票

我在grafana github上发布了这个问题,并且知道这是grafana的问题,他们现在已经解决了。 This是问题的链接。

© www.soinside.com 2019 - 2024. All rights reserved.