Closed silence3322 closed 2 years ago
My node version: v12.18.2 on windows.
I wonder if I can bump this thread if I may? I cannot get this to build either, with what looks like the exact same compile errors. I have tried various permutations of the build but to no avail. I'm running Grafana 7.2.2 on Debian9 Stretch, NodeJS v15.1, NPM7.5.3
It installs all the packages ok, albeit with few dependency and dependency warnings. Just won't build. Any pointers would be much appreciated! What sort of environments have others had success in?
It would be great to get this working as I currently use Grafana in our manufacturing plants, supplementing the SCADA system to give great dashboards; OPC-UA would be an awesome addition.
I get same error.
Same error here. Completely new to TypeScript so I have a hard time even starting to search for a hint. From quick googling it feels like it could "just" be a pbm of versions ? Like the others, a bunch of warning about unmet dependencies at install, then same error at build.
Ubuntu 20.04 Grafana v7.5.3 (3e3cf4dc60) nodejs v10.19.0 npm 6.14.8 yarn-1.22.10 typescript@4.2.4
warning " > @material-ui/core@4.11.2" has unmet peer dependency "react@^16.8.0 || ^17.0.0". warning " > @material-ui/core@4.11.2" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0". warning "@material-ui/core > @material-ui/styles@4.11.2" has unmet peer dependency "react@^16.8.0 || ^17.0.0". warning "@material-ui/core > @material-ui/styles@4.11.2" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0". warning "@material-ui/core > @material-ui/system@4.11.2" has unmet peer dependency "react@^16.8.0 || ^17.0.0". warning "@material-ui/core > @material-ui/system@4.11.2" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0". warning "@material-ui/core > @material-ui/utils@4.11.2" has unmet peer dependency "react@^16.8.0 || ^17.0.0". warning "@material-ui/core > @material-ui/utils@4.11.2" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0". warning "@material-ui/core > react-transition-group@4.4.1" has unmet peer dependency "react@>=16.6.0". warning "@material-ui/core > react-transition-group@4.4.1" has unmet peer dependency "react-dom@>=16.6.0". warning " > antd@3.26.20" has unmet peer dependency "react@>=16.0.0". warning " > antd@3.26.20" has unmet peer dependency "react-dom@>=16.0.0". warning "antd > @ant-design/create-react-context@0.2.5" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0". warning "antd > @ant-design/icons-react@2.0.1" has unmet peer dependency "react@16.x". warning "antd > rc-drawer@3.1.3" has unmet peer dependency "react@*". warning "antd > rc-editor-mention@1.1.13" has unmet peer dependency "react@>=15.x". warning "antd > rc-editor-mention@1.1.13" has unmet peer dependency "react-dom@>=15.x". warning "antd > rc-mentions@0.4.2" has unmet peer dependency "react@*". warning "antd > rc-menu@7.5.5" has unmet peer dependency "react@*". warning "antd > rc-menu@7.5.5" has unmet peer dependency "react-dom@*". warning "antd > rc-resize-observer@0.1.3" has unmet peer dependency "react@^16.0.0". warning "antd > rc-resize-observer@0.1.3" has unmet peer dependency "react-dom@^16.0.0". warning "antd > rc-switch@1.9.2" has unmet peer dependency "react@^16.0.0". warning "antd > rc-switch@1.9.2" has unmet peer dependency "react-dom@^16.0.0". warning "antd > rc-table@6.10.15" has unmet peer dependency "react@^16.0.0". warning "antd > rc-table@6.10.15" has unmet peer dependency "react-dom@^16.0.0". warning "antd > rc-tabs@9.7.0" has unmet peer dependency "react@>=15.0.0". warning "antd > rc-tree@2.1.4" has unmet peer dependency "react@*". warning "antd > rc-tree@2.1.4" has unmet peer dependency "react-dom@*". warning "antd > react-lazy-load@3.1.13" has unmet peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0". warning "antd > react-lazy-load@3.1.13" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0-0 || ^16.0.0". warning "antd > react-slick@0.25.2" has unmet peer dependency "react@^0.14.0 || ^15.0.1 || ^16.0.0". warning "antd > react-slick@0.25.2" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.1 || ^16.0.0". warning "antd > rc-editor-mention > draft-js@0.10.5" has unmet peer dependency "react@^0.14.0 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0". warning "antd > rc-editor-mention > draft-js@0.10.5" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0". warning "antd > rc-editor-mention > rc-editor-core@0.8.10" has unmet peer dependency "react@>=15.0.0". warning "antd > rc-editor-mention > rc-editor-core@0.8.10" has unmet peer dependency "react-dom@>=15.0.0". warning " > rc-cascader@1.0.1" has unmet peer dependency "react@^15.0.0 || ^16.0.0". warning " > rc-cascader@1.0.1" has unmet peer dependency "react-dom@^15.0.0 || ^16.0.0". warning "rc-cascader > rc-trigger > rc-align@4.0.9" has unmet peer dependency "react@>=16.9.0". warning "rc-cascader > rc-trigger > rc-align@4.0.9" has unmet peer dependency "react-dom@>=16.9.0". warning "rc-cascader > rc-trigger > rc-motion@1.1.2" has unmet peer dependency "react@^16.0.0". warning "rc-cascader > rc-trigger > rc-motion@1.1.2" has unmet peer dependency "react-dom@^16.0.0". warning "rc-cascader > rc-trigger > rc-util@5.6.2" has unmet peer dependency "react@>=16.9.0". warning "rc-cascader > rc-trigger > rc-util@5.6.2" has unmet peer dependency "react-dom@>=16.9.0". warning " > react-select@3.1.1" has unmet peer dependency "react@^16.8.0". warning " > react-select@3.1.1" has unmet peer dependency "react-dom@^16.8.0". warning "react-select > @emotion/core@10.1.1" has unmet peer dependency "react@>=16.3.0". warning "react-select > react-input-autosize@2.2.2" has unmet peer dependency "react@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0". warning " > react-window@1.8.6" has unmet peer dependency "react@^15.0.0 || ^16.0.0 || ^17.0.0". warning " > react-window@1.8.6" has unmet peer dependency "react-dom@^15.0.0 || ^16.0.0 || ^17.0.0". warning "@grafana/runtime > @grafana/ui > @grafana/slate-react > slate-react-placeholder@0.2.9" has unmet peer dependency "slate-react@>=0.22.0". warning "@grafana/toolkit > ts-jest@26.3.0" has incorrect peer dependency "jest@>=26 <27".
I tried updating a bit evrything, playing with npm or even yarn2, I still have unmet dependencies and the build process stop at linting, no idea if this might be a hint or adding noise...
grafana-opcua-datasource/src/QueryEditor.tsx 13:1 error '@grafana/ui' import is duplicated no-duplicate-imports grafana-opcua-datasource/src/components/AddEventFilter.tsx 66:18 error Missing "key" prop for element in iterator react/jsx-key grafana-opcua-datasource/src/components/EventFilterTable.tsx 56:11 error Missing "key" prop for element in iterator react/jsx-key /grafana-opcua-datasource/src/components/ButtonCascader/ButtonCascader.tsx 8:1 error '@grafana/ui' import is duplicated no-duplicate-imports grafana-opcua-datasource/src/components/Cascader/Cascader.tsx 4:1 error '@grafana/ui' import is duplicated no-duplicate-imports 5:1 error '@grafana/ui' import is duplicated no-duplicate-imports ✖ 6 problems (6 errors, 0 warnings)
any help, hint direction pointing would be deeply appreciated.
@soniakarkar The double imports have been fixed in the latest PR and builds nicely with yarn build
.
@soniakarkar This datasource is in the official plugin list now, so you don't have to build it anymore :-)
Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: 2.54s Ran all test suites with tests matching "". √ Running tests \ Compiling... Starting type checking service... Using 1 worker with 2048MB memory limit / Compiling... ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/components/TreeEditor.tsx(18,31): TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'. ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts(7,44): TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'. The types returned by 'query(...)' are incompatible between these types. Type 'Observable' is not assignable to type 'Promise | Observable'.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Observable").Observableimport("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observableimport("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse'.
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts(8,20):
TS2345: Argument of type 'typeof ConfigEditor' is not assignable to parameter of type 'ComponentType<DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>>'.
Type 'typeof ConfigEditor' is not assignable to type 'ComponentClass<DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>, any>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>' is not assignable to type 'Props | Readonly'.
Type 'DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>' is not assignable to type 'Readonly'.
Types of property 'options' are incompatible.
Type 'DataSourceSettings<OpcUaDataSourceOptions, unknown>' is not assignable to type 'DataSourceSettings<OpcUaDataSourceOptions, {}>'.
Type 'unknown' is not assignable to type '{}'.
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/QueryEditor.tsx(21,31):
TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'.
The types returned by 'query(...)' are incompatible between these types.
Type 'Observable' is not assignable to type 'Promise | Observable'.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Observable").Observableimport("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observableimport("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse'.
The types of 'source.operator.call' are incompatible between these types.
Type '(subscriber: import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/types").TeardownLogic'.
Types of parameters 'subscriber' and 'subscriber' are incompatible.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Subscriber").Subscriber'.
Property 'isStopped' is protected but type 'Subscriber' is not a class derived from 'Subscriber'.
Hash: b0e80cf97d0082983700 Version: webpack 4.41.5 Time: 17532ms Built at: 2021-02-03 10:02:13 ├F10: AM┤ Asset Size Chunks Chunk Names CHANGELOG.md 193 bytes [emitted] LICENSE 11.3 KiB [emitted] README.md 2.42 KiB [emitted] img/dashboard1.png 189 KiB [emitted] img/dashboard2.png 907 KiB [emitted] [big] img/logo.svg 876 bytes [emitted] img/opc_logo.png 63.1 KiB [emitted] module.js 152 KiB 0 [emitted] module module.js.LICENSE.txt 1.31 KiB [emitted] module.js.map 677 KiB 0 [emitted] [dev] module plugin.json 1.02 KiB [emitted] Entrypoint module = module.js module.js.map [0] external "react" 42 bytes {0} [built] [1] external "@grafana/ui" 42 bytes {0} [built] [11] external "emotion" 42 bytes {0} [built] [13] external "@grafana/data" 42 bytes {0} [built] [14] external "@grafana/runtime" 42 bytes {0} [built] [21] ../node_modules/@material-ui/core/esm/TableBody/index.js 38 bytes [built] [22] ../node_modules/@material-ui/core/esm/TableCell/index.js 38 bytes [built] [23] ../node_modules/@material-ui/core/esm/TableRow/index.js 37 bytes [built] [24] ../node_modules/@material-ui/core/esm/Table/index.js 34 bytes [built] [25] ../node_modules/@material-ui/core/esm/index.js 10.3 KiB [built] [32] ./module.ts + 130 modules 387 KiB {0} [built] | ./module.ts 296 bytes [built] | ./DataSource.ts 661 bytes [built] | ./ConfigEditor.tsx 820 bytes [built] | ./QueryEditor.tsx 17.2 KiB [built] | ../node_modules/tslib/tslib.es6.js 10 KiB [built] | ./components/ButtonCascader/ButtonCascader.tsx 1.47 KiB [built] | ./types.ts 1.7 KiB [built] | ./components/SegmentFrame.tsx 1 KiB [built] | ./components/EventFieldTable.tsx 2.81 KiB [built] | ./components/AddEventFieldForm.tsx 1.9 KiB [built] | ./components/EventFilterTable.tsx 3.46 KiB [built] | ./components/AddEventFilter.tsx 3.49 KiB [built] | ../node_modules/rc-cascader/es/index.js 59 bytes [built] | ../node_modules/rc-cascader/es/Cascader.js 16.1 KiB [built] | ../node_modules/@material-ui/core/esm/Table/Table.js 3.1 KiB [built] | + 116 hidden modules [33] ../node_modules/@material-ui/core/esm/TableHead/index.js 38 bytes [built] [46] ../node_modules/@material-ui/core/esm/AccordionActions/index.js 45 bytes [built] [48] ../node_modules/@material-ui/core/esm/AccordionDetails/index.js 45 bytes [built] [50] ../node_modules/@material-ui/core/esm/AccordionSummary/index.js 45 bytes [built]
392 hidden modules
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/components/TreeEditor.tsx ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/components/TreeEditor.tsx(18,31): TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'.
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts(7,44): TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'. The types returned by 'query(...)' are incompatible between these types. Type 'Observable' is not assignable to type 'Promise | Observable'.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Observable").Observableimport("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observableimport("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse'.
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts(8,20): TS2345: Argument of type 'typeof ConfigEditor' is not assignable to parameter of type 'ComponentType<DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>>'. Type 'typeof ConfigEditor' is not assignable to type 'ComponentClass<DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>, any>'. Types of parameters 'props' and 'props' are incompatible. Type 'DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>' is not assignable to type 'Props | Readonly'.
Type 'DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>' is not assignable to type 'Readonly'.
Types of property 'options' are incompatible.
Type 'DataSourceSettings<OpcUaDataSourceOptions, unknown>' is not assignable to type 'DataSourceSettings<OpcUaDataSourceOptions, {}>'.
Type 'unknown' is not assignable to type '{}'.
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/QueryEditor.tsx ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/QueryEditor.tsx(21,31): TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'. The types returned by 'query(...)' are incompatible between these types. Type 'Observable' is not assignable to type 'Promise | Observable'.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Observable").Observableimport("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observableimport("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse'.
The types of 'source.operator.call' are incompatible between these types.
Type '(subscriber: import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/types").TeardownLogic'.
Types of parameters 'subscriber' and 'subscriber' are incompatible.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Subscriber").Subscriber'.
Property 'isStopped' is protected but type 'Subscriber' is not a class derived from 'Subscriber'.
Trace: Build failed at E:\nodeJsLearing\grafana-opcua-datasource\node_modules\@grafana\src\cli\utils\useSpinner.ts:10:13 at step (E:\nodeJsLearing\grafana-opcua-datasource\node_modules\@grafana\toolkit\node_modules\tslib\tslib.js:140:27) at Object.throw (E:\nodeJsLearing\grafana-opcua-datasource\node_modules\@grafana\toolkit\node_modules\tslib\tslib.js:121:57) at rejected (E:\nodeJsLearing\grafana-opcua-datasource\node_modules\@grafana\toolkit\node_modules\tslib\tslib.js:112:69) at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
× Build failed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.