Custom Prometheus data source plugin

Attempted to create a custom Prometheus data source plugin that is pre-configured for application. Obtained the source code for the original Prometheus data source plugin from the repo: grafana/public/app/plugins/datasource/prometheus at main · grafana/grafana · GitHub

Then followed the procedure for adding the folder to the plugins folder listed in config file. The custom data source appears on the plugin list in console, but is unsigned with no description loading. The custom data source is available to use, but after selecting to add it, the following error appears:
Fetch error: 404 Instantiating https:// **** /public/plugins/prometheus3/module.js Loading plugins/prometheus3/module

Looking at the files from repo, they are all .ts format for React. Also tried this link but got a generic plugin folder that appears unrelated to Prometheus: https://grafana.com/api/plugins/prometheus/versions/5.0.0/download

Is it possible to obtain the source code of the Prometheus data source in .js format for Angular which is expected by console?

Version of Grafana is 7.5.4 and would expect React plugins to load. However, other plugins such as clock and pie-chart panel using Angular appear to work instead after loading. As an alternative to using an Angular version of Prometheus data source plugin, understanding why the console at this version would expect Angular.

That’s an interesting thing to try. My first question is whether you tried to actually build the plugin? You don’t mention building, so I’m assuming that’s a key missing piece. The build process is what will generate the JS files (in a dist directory) from the TS sources, and those are the files Grafana will actually load.

Now, for most custom plugins (e.g. GitHub - fifemon/graphql-datasource: Grafana datasource plugin to query data from a GraphQL API) you will have yarn.lock and plugin.json files that allow you to build the plugin by running e.g.

yarn install --pure-lockfile
yarn build

The Prometheus sources you point to obviously don’t have those, since they’re not designed to be built as a stand-alone plugin (but as part of the overall Grafana “tree”). So if you wanted to build it as a stand-alone plugin you’ll need to copy/tweak/generate those files somehow, in a way that will ensure that the right dependencies are installed during build.

I know this isn’t a full answer to your question, but hopefully it helps directionally.

1 Like

Thanks! Yes, I believe this was the part missing. Looked through my old notes with the simple react plugin, as opposed to signed/built plugins, and forgot those extra steps are required before an unsigned plugin works. Will try this again and hopefully should work.

Is there a way to access the source code for the official Prometheus plugin to obtain yarn.lock, plugin.json, etc? Was hoping to take the existing one and just tweak a few things.

Nevermind, I see what you wrote regarding this. Seems like a project that will take some time.

I assume the same goes with the panel plugin? If for example I wanted to have a plugin pre-configured for a panel to plot certain metrics: grafana/public/app/plugins/panel/graph at main · grafana/grafana · GitHub

Yeah, it’s a tough one - maybe others here have better pointers.

If you’re up for a small adventure you could copy the generic/minimal package.json file from the “starter datasource” plugin, and try to build based on that - then see how it breaks, and include additional dependencies from the main Grafana package.json as needed.

2 Likes

Ok, thanks a lot for the suggestion! Seems like a good starting point.

Can maybe try something similar with the simple react panel plugin for developing a graph plugin.

Trying out Grafana 8, and looks like library panels might be a good step in this direction. Can use library panels in each dashboard template within a folder, then update the original library panels to cascade changes. If its possible to have library panels span multiple organizations within a console, that would be very helpful.

Performed suggested test with prometheus and graph plugins from grafana repo using package.json from the starter data source/panel plugins. I can share the results of ‘yarn dev’ after adding dependencies for prometheus (enzyme, slate, slate-plain-serializer, prismjs, lru-cache, d3) and graph (core, jquery, d3, angular, tinycolor2). However, there are still a lot of errors, some of which relate to core modules that I am not sure where are listed in the main grafana package.json. I was able to get the starter data source/panel plugins to build and appear on the console as allowed unsigned plugins, which could act as a starting point to move toward prometheus/graph plugins but possibly a lot of work.

prometheus (folder called prometheus2) part 1:

yarn run v1.22.5
$ grafana-toolkit plugin:dev
✔ Linting
⠋ Bundling plugin in dev mode  Starting type checking service...
  Using 1 worker with 2048MB memory limit
⠼ Bundling plugin in dev mode  ⚠ 「copy-webpack-plugin」: unable to locate '../LICENSE' at '/var/lib/grafana/plugins/prometheus2/LICENSE'
  ⚠ 「copy-webpack-plugin」: unable to locate '../CHANGELOG.md' at '/var/lib/grafana/plugins/prometheus2/CHANGELOG.md'
⠸ Bundling plugin in dev mode  Module not found: Error: Can't resolve '../../../features/dashboard/services/TimeSrv' in '/var/lib/grafana/plugins/prometheus2/src'
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/prometheus2/src/configuration'
  Module not found: Error: Can't resolve 'app/core/utils/CancelablePromise' in '/var/lib/grafana/plugins/prometheus2/src/components'
  Module not found: Error: Can't resolve 'app/core/utils/explore' in '/var/lib/grafana/plugins/prometheus2/src'
  Module not found: Error: Can't resolve 'app/features/dashboard/services/TimeSrv' in '/var/lib/grafana/plugins/prometheus2/src'
  Module not found: Error: Can't resolve 'app/features/dashboard/services/TimeSrv' in '/var/lib/grafana/plugins/prometheus2/src'
  Module not found: Error: Can't resolve 'app/features/templating/template_srv' in '/var/lib/grafana/plugins/prometheus2/src'
  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromExploreQueryEditor.tsx(12,44):
  TS2344: Type 'PrometheusDatasource' does not satisfy the constraint 'DataSourceApi<PromQuery, PromOptions, {}>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromQueryEditor.tsx(16,38):
  TS2344: Type 'PrometheusDatasource' does not satisfy the constraint 'DataSourceApi<PromQuery, PromOptions, {}>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromQueryField.tsx(22,58):
  TS2307: Cannot find module 'app/core/utils/CancelablePromise' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromQueryField.tsx(122,62):
  TS2344: Type 'PrometheusDatasource' does not satisfy the constraint 'DataSourceApi<PromQuery, PromOptions, {}>'.
    The types returned by 'query(...)' are incompatible between these types.
      Type 'Observable<DataQueryResponse>' is not assignable to type 'Promise<DataQueryResponse> | Observable<DataQueryResponse>'.
        Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ConfigEditor.tsx(6,24):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ConfigEditor.tsx(17,9):
  TS2322: Type '(options: DataSourceSettings<PromOptions, {}>) => void' is not assignable to type '(config: DataSourceSettings<DataSourceJsonData, {}>) => void'.
    Types of parameters 'options' and 'config' are incompatible.
      Type 'DataSourceSettings<DataSourceJsonData, {}>' is not assignable to type 'DataSourceSettings<PromOptions, {}>'.
        Type 'DataSourceJsonData' is missing the following properties from type 'PromOptions': timeInterval, queryTimeout, httpMethod, directUrl
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(2,34):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(20,12):
  TS2741: Property 'css' is missing in type '{ value: boolean; onChange: (ev: FormEvent<HTMLInputElement>) => void; }' but required in type 'Pick<InlineSwitchProps, "key" | "value" | "summary" | "min" | "max" | "type" | "prefix" | "start" | "label" | "kind" | "is" | "name" | "data" | "onChange" | "onBlur" | ... 346 more ... | "showLabel">'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(47,24):
  TS7006: Parameter 'ds' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(62,12):
  TS2741: Property 'css' is missing in type '{ placeholder: string; spellCheck: false; width: number; value: string | undefined; onChange: (event: FormEvent<HTMLInputElement>) => void; }' but required in type 'Pick<Props, "key" | "value" | "summary" | "min" | "max" | "type" | "prefix" | "start" | "label" | "kind" | "is" | "name" | "data" | "onChange" | "onBlur" | "id" | "title" | "color" | ... 345 more ... | "addonAfter">'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(83,10):
  TS2741: Property 'css' is missing in type '{ placeholder: string; spellCheck: false; width: number; value: string; onChange: (event: FormEvent<HTMLInputElement>) => void; }' but required in type 'Pick<Props, "key" | "value" | "summary" | "min" | "max" | "type" | "prefix" | "start" | "label" | "kind" | "is" | "name" | "data" | "onChange" | "onBlur" | "id" | "title" | "color" | ... 345 more ... | "addonAfter">'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/mocks.ts(3,42):
  TS2307: Cannot find module '../../../../features/datasources/mocks' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(22,30):
  TS2307: Cannot find module '../../../features/variables/types' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(23,26):
  TS2307: Cannot find module '../../../../test/lib/common' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(24,30):
  TS2307: Cannot find module 'app/types' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(73,53):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(73,71):
  TS7006: Parameter 'response' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(80,55):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(80,73):
  TS7006: Parameter 'response' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(87,85):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(87,103):
  TS7006: Parameter 'response' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(95,87):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(95,105):
  TS7006: Parameter 'response' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(241,37):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(241,55):
  TS7006: Parameter 'result' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(285,37):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(285,55):
  TS7006: Parameter 'result' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(16,62):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(17,36):
  TS2307: Cannot find module 'app/core/utils/explore' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(18,37):
  TS2307: Cannot find module 'app/features/dashboard/services/TimeSrv' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(19,45):
  TS2307: Cannot find module 'app/features/templating/template_srv' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(265,3):
  TS2416: Property 'query' in type 'PrometheusDatasource' is not assignable to the same property in base type 'DataSourceApi<PromQuery, PromOptions, {}>'.
    Type '(options: DataQueryRequest<PromQuery>) => Observable<DataQueryResponse>' is not assignable to type '(request: DataQueryRequest<PromQuery>) => Promise<DataQueryResponse> | Observable<DataQueryResponse>'.
      Type 'Observable<DataQueryResponse>' is not assignable to type 'Promise<DataQueryResponse> | Observable<DataQueryResponse>'.
        Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(279,7):
  TS2322: Type 'Observable<unknown>' is not assignable to type 'Observable<DataQueryResponse>'.
    Type 'unknown' is not assignable to type 'DataQueryResponse'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(282,5):
  TS2322: Type 'Observable<{ data: unknown; key: string; state: LoadingState; }>' is not assignable to type 'Observable<DataQueryResponse>'.
    Type '{ data: unknown; key: string; state: LoadingState; }' is not assignable to type 'DataQueryResponse'.
      Types of property 'data' are incompatible.
        Type 'unknown' is not assignable to type 'any[]'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(381,22):
  TS2548: Type 'unknown' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(381,33):
  TS2548: Type 'unknown' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(646,44):
  TS7006: Parameter 'series' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(649,14):
  TS2345: Argument of type '([_k, v]: [string, string]) => string' is not assignable to parameter of type '(value: [string, unknown], index: number, array: [string, unknown][]) => string'.
    Types of parameters '__0' and 'value' are incompatible.
      Type '[string, unknown]' is not assignable to type '[string, string]'.
        Type 'unknown' is not assignable to type 'string'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(663,50):
  TS7006: Parameter 'value' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(664,56):
  TS7006: Parameter 'value' implicitly has an 'any' type.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(71,84):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
    Types of property 'annotations' are incompatible.
      Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/immutable/dist/immutable-nonambient").Map<string, import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Annotation>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/immutable/dist/immutable-nonambient").Map<string, import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Annotation>'.
        Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Annotation' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Annotation'.
          The types of 'anchor.isAfterPoint' are incompatible between these types.
            Type '(point: import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Point) => boolean' is not assignable to type '(point: import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Point) => boolean'.
              Types of parameters 'point' and 'point' are incompatible.
                Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Point' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Point'.
                  Types of property 'isAfterRange' are incompatible.
                    Type '(range: import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").RangeType) => boolean' is not assignable to type '(range: import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").RangeType) => boolean'.
                      Types of parameters 'range' and 'range' are incompatible.
                        Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").RangeType' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").RangeType'.
                          Type 'Annotation' is not assignable to type 'RangeType'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(80,84):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(95,33):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(120,9):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(156,35):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(182,85):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(191,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(213,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(231,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(256,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(289,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(311,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(333,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(351,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(372,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(392,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(413,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(414,28):
  TS2345: Argument of type 'Block' is not assignable to parameter of type 'Document | Text | Block | Inline'.
    Property 'findDescendants' is missing in type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Block' but required in type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Block'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(438,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(462,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(483,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(501,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(527,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(553,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.ts(71,3):
  TS2564: Property 'startTask' has no initializer and is not definitely assigned in the constructor.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.ts(72,3):
  TS2416: Property 'datasource' in type 'PromQlLanguageProvider' is not assignable to the same property in base type 'LanguageProvider'.
    Type 'PrometheusDatasource' is not assignable to type 'DataSourceApi<any, any, {}>'.
      The types returned by 'query(...)' are incompatible between these types.
        Type 'Observable<DataQueryResponse>' is not assignable to type 'Promise<DataQueryResponse> | Observable<DataQueryResponse>'.
          Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.
            The types of 'source.operator.call' are incompatible between these types.
              Type '(subscriber: import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/types").TeardownLogic'.
                Types of parameters 'subscriber' and 'subscriber' are incompatible.
                  Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber<any>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Subscriber").Subscriber<any>'.
                    Property 'isStopped' is protected but type 'Subscriber<T>' is not a class derived from 'Subscriber<T>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.ts(267,57):
  TS2345: Argument of type '(text: string, block: Block | undefined) => string' is not assignable to parameter of type '(reduction?: string | undefined, value?: Block | undefined, key?: number | undefined, iter?: Iterable<number, Block> | undefined) => string'.
    Types of parameters 'text' and 'reduction' are incompatible.
      Type 'string | undefined' is not assignable to type 'string'.
        Type 'undefined' is not assignable to type 'string'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_utils.ts(15,19):
  TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.test.ts(7,28):
  TS2307: Cannot find module 'app/core/services/backend_srv' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.test.ts(9,31):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.ts(6,28):
  TS2307: Cannot find module 'app/features/dashboard/services/TimeSrv' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.ts(141,21):
  TS2571: Object is of type 'unknown'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/module.ts(15,44):
  TS2345: Argument of type 'typeof PrometheusDatasource' is not assignable to parameter of type 'DataSourceConstructor<DataSourceApi<never, PromOptions, {}>, never, PromOptions>'.
    Construct signature return types 'PrometheusDatasource' and 'DataSourceApi<never, PromOptions, {}>' are incompatible.
      The types of 'importQueries' are incompatible between these types.
        Type '((queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<PromQuery[]>) | undefined' is not assignable to type '((queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<never[]>) | undefined'.
          Type '(queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<PromQuery[]>' is not assignable to type '(queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<never[]>'.
            Type 'Promise<PromQuery[]>' is not assignable to type 'Promise<never[]>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/module.ts(16,19):
  TS2345: Argument of type 'typeof PromQueryEditor' is not assignable to parameter of type 'ComponentType<QueryEditorProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions, never>>'.

prometheus part 2:

    Type 'typeof PromQueryEditor' is not assignable to type 'ComponentClass<QueryEditorProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions, never>, any>'.
      Types of parameters 'props' and 'props' are incompatible.
        Type 'QueryEditorProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions, never>' is not assignable to type 'Props'.
          Types of property 'datasource' are incompatible.
            Type 'DataSourceApi<never, PromOptions, {}>' is not assignable to type 'PrometheusDatasource'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/module.ts(18,32):
  TS2345: Argument of type 'NamedExoticComponent<Props>' is not assignable to parameter of type 'ComponentType<ExploreQueryFieldProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions>>'.
    Type 'NamedExoticComponent<Props>' is not assignable to type 'FunctionComponent<ExploreQueryFieldProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions>>'.
      Types of parameters 'props' and 'props' are incompatible.
        Type 'PropsWithChildren<ExploreQueryFieldProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions>>' is not assignable to type 'Props'.
          Types of property 'datasource' are incompatible.
            Type 'DataSourceApi<never, PromOptions, {}>' is not assignable to type 'PrometheusDatasource'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/result_transformer.ts(17,65):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/types.ts(2,28):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(10,45):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(15,37):
  TS2307: Cannot find module '../../../features/dashboard/services/TimeSrv' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(17,72):
  TS2344: Type 'PrometheusDatasource' does not satisfy the constraint 'DataSourceApi<never, never, {}>'.
    Types of property 'importQueries' are incompatible.
      Type '((queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<PromQuery[]>) | undefined' is not assignable to type '((queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<never[]>) | undefined'.
        Type '(queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<PromQuery[]>' is not assignable to type '(queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<never[]>'.
          Type 'Promise<PromQuery[]>' is not assignable to type 'Promise<never[]>'.
            Type 'PromQuery[]' is not assignable to type 'never[]'.
              Type 'PromQuery' is not assignable to type 'never'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(27,3):
  TS2416: Property 'query' in type 'PrometheusVariableSupport' is not assignable to the same property in base type 'StandardVariableSupport<PrometheusDatasource, never, never>'.
    Type '(request: DataQueryRequest<PromQuery>) => Observable<DataQueryResponse>' is not assignable to type '(request: DataQueryRequest<never>) => Observable<DataQueryResponse>'.
      Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(50,3):
  TS2416: Property 'toDataQuery' in type 'PrometheusVariableSupport' is not assignable to the same property in base type 'StandardVariableSupport<PrometheusDatasource, never, never>'.
    Type '(query: StandardVariableQuery) => PromQuery' is not assignable to type '(query: StandardVariableQuery) => never'.
      Type 'PromQuery' is not assignable to type 'never'.

   Hash: 82c129f16827dfb557d8
  Version: webpack 4.41.5
  Time: 31637ms
  Built at: 07/08/2021 10:24:40 PM
                               Asset       Size  Chunks                          Chunk Names
                           README.md  293 bytes          [emitted]
       dashboards/grafana_stats.json     23 KiB          [emitted]
  dashboards/prometheus_2_stats.json   29.3 KiB          [emitted]
    dashboards/prometheus_stats.json   17.7 KiB          [emitted]
             img/prometheus_logo.svg   1.05 KiB          [emitted]
                           module.js    748 KiB  module  [emitted]        [big]  module
                       module.js.map    654 KiB  module  [emitted] [dev]         module
    partials/annotations.editor.html   1.78 KiB          [emitted]
                         plugin.json    1.7 KiB          [emitted]
  Entrypoint module [big] = module.js module.js.map
  [../node_modules/lru-cache/index.js] 7.99 KiB {module} [built]
  [../node_modules/rxjs/_esm5/operators/index.js] 6.15 KiB {module} [built]
  [../node_modules/tslib/tslib.es6.js] 10 KiB {module} [built]
  [./add_label_to_query.ts] 4.89 KiB {module} [built]
  [./components/PromCheatSheet.tsx] 1.85 KiB {module} [built]
  [./components/PromExemplarField.tsx] 1.93 KiB {module} [built]
  [./components/PromExploreExtraField.tsx] 2.57 KiB {module} [built]
  [./components/PromExploreQueryEditor.tsx] 2.66 KiB {module} [built]
  [./components/PromLink.tsx] 1.6 KiB {module} [built]
  [./components/PromQueryEditor.tsx] 6.61 KiB {module} [built]
  [./components/PromQueryField.tsx] 13.2 KiB {module} [built]
  [./configuration/ConfigEditor.tsx] 696 bytes {module} [built]
  [./datasource.ts] 36.3 KiB {module} [built]
  [./module.ts] 975 bytes {module} [built]
  [@grafana/data] external "@grafana/data" 42 bytes {module} [built]
      + 200 hidden modules

  WARNING in ./datasource.ts 421:31-44
  "export '__spreadArray' was not found in 'tslib'
   @ ./module.ts

  WARNING in ./datasource.ts 461:15-28
  "export '__spreadArray' was not found in 'tslib'
   @ ./module.ts

  WARNING in ./datasource.ts 461:29-42
  "export '__spreadArray' was not found in 'tslib'
   @ ./module.ts

  WARNING in ./language_provider.ts 252:21-34
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./language_provider.ts 252:35-48
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./language_provider.ts 631:15-28
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./language_utils.ts 17:15-28
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./result_transformer.ts 40:36-49
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./result_transformer.ts 57:122-135
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./result_transformer.ts 57:136-149
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./result_transformer.ts 224:52-65
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./result_transformer.ts 384:12-25
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./result_transformer.ts 384:26-39
  "export '__spreadArray' was not found in 'tslib'
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./components/PromQueryField.tsx 78:9-22
  "export '__spreadArray' was not found in 'tslib'
   @ ./components/PromQueryEditor.tsx
   @ ./module.ts

  WARNING in ./components/PromQueryField.tsx 78:23-36
  "export '__spreadArray' was not found in 'tslib'
   @ ./components/PromQueryEditor.tsx
   @ ./module.ts

  WARNING in ./components/PromQueryField.tsx 280:57-70
  "export '__spreadArray' was not found in 'tslib'
   @ ./components/PromQueryEditor.tsx
   @ ./module.ts

  WARNING in ./promql.ts 75:23-36
  "export '__spreadArray' was not found in 'tslib'
   @ ./language_provider.ts
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./promql.ts 75:37-50
  "export '__spreadArray' was not found in 'tslib'
   @ ./language_provider.ts
   @ ./datasource.ts
   @ ./module.ts

  WARNING in ./configuration/ExemplarsSettings.tsx 16:25-38
  "export '__spreadArray' was not found in 'tslib'
   @ ./configuration/PromSettings.tsx
   @ ./configuration/ConfigEditor.tsx
   @ ./module.ts

  WARNING in ./configuration/ExemplarsSettings.tsx 23:25-38
  "export '__spreadArray' was not found in 'tslib'
   @ ./configuration/PromSettings.tsx
   @ ./configuration/ConfigEditor.tsx
   @ ./module.ts

  WARNING in ./configuration/ExemplarsSettings.tsx 37:23-36
  "export '__spreadArray' was not found in 'tslib'
   @ ./configuration/PromSettings.tsx
   @ ./configuration/ConfigEditor.tsx
   @ ./module.ts

  WARNING in ./configuration/ExemplarsSettings.tsx 37:37-50
  "export '__spreadArray' was not found in 'tslib'
   @ ./configuration/PromSettings.tsx
   @ ./configuration/ConfigEditor.tsx
   @ ./module.ts

  WARNING in unable to locate '../LICENSE' at '/var/lib/grafana/plugins/prometheus2/LICENSE'

  WARNING in unable to locate '../CHANGELOG.md' at '/var/lib/grafana/plugins/prometheus2/CHANGELOG.md'

  ERROR in ./variables.ts
  Module not found: Error: Can't resolve '../../../features/dashboard/services/TimeSrv' in '/var/lib/grafana/plugins/prometheus2/src'
   @ ./variables.ts 7:0-74 20:16-26
   @ ./datasource.ts
   @ ./module.ts

  ERROR in ./configuration/ConfigEditor.tsx
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/prometheus2/src/configuration'
   @ ./configuration/ConfigEditor.tsx 4:0-41 13:28-34
   @ ./module.ts

  ERROR in ./components/PromQueryField.tsx
  Module not found: Error: Can't resolve 'app/core/utils/CancelablePromise' in '/var/lib/grafana/plugins/prometheus2/src/components'
   @ ./components/PromQueryField.tsx 7:0-73 161:59-80
   @ ./components/PromQueryEditor.tsx
   @ ./module.ts

  ERROR in ./datasource.ts
  Module not found: Error: Can't resolve 'app/core/utils/explore' in '/var/lib/grafana/plugins/prometheus2/src'
   @ ./datasource.ts 4:0-60 147:26-44
   @ ./module.ts

  ERROR in ./datasource.ts
  Module not found: Error: Can't resolve 'app/features/dashboard/services/TimeSrv' in '/var/lib/grafana/plugins/prometheus2/src'
   @ ./datasource.ts 5:0-69 34:16-26
   @ ./module.ts

  ERROR in ./metric_find_query.ts
  Module not found: Error: Can't resolve 'app/features/dashboard/services/TimeSrv' in '/var/lib/grafana/plugins/prometheus2/src'
   @ ./metric_find_query.ts 3:0-69 13:17-27
   @ ./datasource.ts
   @ ./module.ts

  ERROR in ./datasource.ts
  Module not found: Error: Can't resolve 'app/features/templating/template_srv' in '/var/lib/grafana/plugins/prometheus2/src'
   @ ./datasource.ts 6:0-70 30:20-34
   @ ./module.ts

  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromExploreQueryEditor.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromExploreQueryEditor.tsx(12,44):
  TS2344: Type 'PrometheusDatasource' does not satisfy the constraint 'DataSourceApi<PromQuery, PromOptions, {}>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromQueryEditor.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromQueryEditor.tsx(16,38):
  TS2344: Type 'PrometheusDatasource' does not satisfy the constraint 'DataSourceApi<PromQuery, PromOptions, {}>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromQueryField.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromQueryField.tsx(22,58):
  TS2307: Cannot find module 'app/core/utils/CancelablePromise' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromQueryField.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/components/PromQueryField.tsx(122,62):
  TS2344: Type 'PrometheusDatasource' does not satisfy the constraint 'DataSourceApi<PromQuery, PromOptions, {}>'.
    The types returned by 'query(...)' are incompatible between these types.
      Type 'Observable<DataQueryResponse>' is not assignable to type 'Promise<DataQueryResponse> | Observable<DataQueryResponse>'.
        Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ConfigEditor.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ConfigEditor.tsx(6,24):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ConfigEditor.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ConfigEditor.tsx(17,9):
  TS2322: Type '(options: DataSourceSettings<PromOptions, {}>) => void' is not assignable to type '(config: DataSourceSettings<DataSourceJsonData, {}>) => void'.
    Types of parameters 'options' and 'config' are incompatible.
      Type 'DataSourceSettings<DataSourceJsonData, {}>' is not assignable to type 'DataSourceSettings<PromOptions, {}>'.
        Type 'DataSourceJsonData' is missing the following properties from type 'PromOptions': timeInterval, queryTimeout, httpMethod, directUrl

  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(2,34):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(20,12):
  TS2741: Property 'css' is missing in type '{ value: boolean; onChange: (ev: FormEvent<HTMLInputElement>) => void; }' but required in type 'Pick<InlineSwitchProps, "key" | "value" | "summary" | "min" | "max" | "type" | "prefix" | "start" | "label" | "kind" | "is" | "name" | "data" | "onChange" | "onBlur" | ... 346 more ... | "showLabel">'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(47,24):
  TS7006: Parameter 'ds' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(62,12):
  TS2741: Property 'css' is missing in type '{ placeholder: string; spellCheck: false; width: number; value: string | undefined; onChange: (event: FormEvent<HTMLInputElement>) => void; }' but required in type 'Pick<Props, "key" | "value" | "summary" | "min" | "max" | "type" | "prefix" | "start" | "label" | "kind" | "is" | "name" | "data" | "onChange" | "onBlur" | "id" | "title" | "color" | ... 345 more ... | "addonAfter">'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/ExemplarSetting.tsx(83,10):
  TS2741: Property 'css' is missing in type '{ placeholder: string; spellCheck: false; width: number; value: string; onChange: (event: FormEvent<HTMLInputElement>) => void; }' but required in type 'Pick<Props, "key" | "value" | "summary" | "min" | "max" | "type" | "prefix" | "start" | "label" | "kind" | "is" | "name" | "data" | "onChange" | "onBlur" | "id" | "title" | "color" | ... 345 more ... | "addonAfter">'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/mocks.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/configuration/mocks.ts(3,42):
  TS2307: Cannot find module '../../../../features/datasources/mocks' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(22,30):
  TS2307: Cannot find module '../../../features/variables/types' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(23,26):
  TS2307: Cannot find module '../../../../test/lib/common' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(24,30):
  TS2307: Cannot find module 'app/types' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(73,53):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(73,71):
  TS7006: Parameter 'response' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(80,55):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(80,73):
  TS7006: Parameter 'response' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(87,85):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(87,103):
  TS7006: Parameter 'response' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(95,87):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(95,105):
  TS7006: Parameter 'response' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(241,37):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(241,55):
  TS7006: Parameter 'result' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(285,37):
  TS2339: Property 'toEmitValuesWith' does not exist on type 'JestMatchers<Observable<DataQueryResponse>>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.test.ts(285,55):
  TS7006: Parameter 'result' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(16,62):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(17,36):
  TS2307: Cannot find module 'app/core/utils/explore' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(18,37):
  TS2307: Cannot find module 'app/features/dashboard/services/TimeSrv' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(19,45):
  TS2307: Cannot find module 'app/features/templating/template_srv' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(265,3):
  TS2416: Property 'query' in type 'PrometheusDatasource' is not assignable to the same property in base type 'DataSourceApi<PromQuery, PromOptions, {}>'.
    Type '(options: DataQueryRequest<PromQuery>) => Observable<DataQueryResponse>' is not assignable to type '(request: DataQueryRequest<PromQuery>) => Promise<DataQueryResponse> | Observable<DataQueryResponse>'.
      Type 'Observable<DataQueryResponse>' is not assignable to type 'Promise<DataQueryResponse> | Observable<DataQueryResponse>'.
        Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(279,7):
  TS2322: Type 'Observable<unknown>' is not assignable to type 'Observable<DataQueryResponse>'.
    Type 'unknown' is not assignable to type 'DataQueryResponse'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(282,5):
  TS2322: Type 'Observable<{ data: unknown; key: string; state: LoadingState; }>' is not assignable to type 'Observable<DataQueryResponse>'.
    Type '{ data: unknown; key: string; state: LoadingState; }' is not assignable to type 'DataQueryResponse'.
      Types of property 'data' are incompatible.
        Type 'unknown' is not assignable to type 'any[]'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(381,22):
  TS2548: Type 'unknown' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(381,33):
  TS2548: Type 'unknown' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(646,44):
  TS7006: Parameter 'series' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(649,14):
  TS2345: Argument of type '([_k, v]: [string, string]) => string' is not assignable to parameter of type '(value: [string, unknown], index: number, array: [string, unknown][]) => string'.
    Types of parameters '__0' and 'value' are incompatible.
      Type '[string, unknown]' is not assignable to type '[string, string]'.
        Type 'unknown' is not assignable to type 'string'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(663,50):
  TS7006: Parameter 'value' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/datasource.ts(664,56):
  TS7006: Parameter 'value' implicitly has an 'any' type.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(71,84):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.
    Types of property 'annotations' are incompatible.
      Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/immutable/dist/immutable-nonambient").Map<string, import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Annotation>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/immutable/dist/immutable-nonambient").Map<string, import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Annotation>'.
        Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Annotation' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Annotation'.
          The types of 'anchor.isAfterPoint' are incompatible between these types.
            Type '(point: import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Point) => boolean' is not assignable to type '(point: import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Point) => boolean'.
              Types of parameters 'point' and 'point' are incompatible.
                Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Point' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Point'.
                  Types of property 'isAfterRange' are incompatible.
                    Type '(range: import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").RangeType) => boolean' is not assignable to type '(range: import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").RangeType) => boolean'.
                      Types of parameters 'range' and 'range' are incompatible.
                        Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").RangeType' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").RangeType'.
                          Type 'Annotation' is not assignable to type 'RangeType'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(80,84):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(95,33):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(120,9):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(156,35):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

prometheus part 3:

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(182,85):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(191,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(213,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(231,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(256,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(289,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(311,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(333,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(351,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(372,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(392,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(413,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(414,28):
  TS2345: Argument of type 'Block' is not assignable to parameter of type 'Document | Text | Block | Inline'.
    Property 'findDescendants' is missing in type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Block' but required in type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Block'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(438,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(462,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(483,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(501,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(527,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.test.ts(553,36):
  TS2322: Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate-plain-serializer/node_modules/@types/slate/index").Value' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@types/slate/index").Value'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.ts(71,3):
  TS2564: Property 'startTask' has no initializer and is not definitely assigned in the constructor.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.ts(72,3):
  TS2416: Property 'datasource' in type 'PromQlLanguageProvider' is not assignable to the same property in base type 'LanguageProvider'.
    Type 'PrometheusDatasource' is not assignable to type 'DataSourceApi<any, any, {}>'.
      The types returned by 'query(...)' are incompatible between these types.
        Type 'Observable<DataQueryResponse>' is not assignable to type 'Promise<DataQueryResponse> | Observable<DataQueryResponse>'.
          Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.
            The types of 'source.operator.call' are incompatible between these types.
              Type '(subscriber: import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber<any>, source: any) => import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/types").TeardownLogic'.
                Types of parameters 'subscriber' and 'subscriber' are incompatible.
                  Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber<any>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Subscriber").Subscriber<any>'.
                    Property 'isStopped' is protected but type 'Subscriber<T>' is not a class derived from 'Subscriber<T>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_provider.ts(267,57):
  TS2345: Argument of type '(text: string, block: Block | undefined) => string' is not assignable to parameter of type '(reduction?: string | undefined, value?: Block | undefined, key?: number | undefined, iter?: Iterable<number, Block> | undefined) => string'.
    Types of parameters 'text' and 'reduction' are incompatible.
      Type 'string | undefined' is not assignable to type 'string'.
        Type 'undefined' is not assignable to type 'string'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_utils.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/language_utils.ts(15,19):
  TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.test.ts(7,28):
  TS2307: Cannot find module 'app/core/services/backend_srv' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.test.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.test.ts(9,31):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.ts(6,28):
  TS2307: Cannot find module 'app/features/dashboard/services/TimeSrv' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/metric_find_query.ts(141,21):
  TS2571: Object is of type 'unknown'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/module.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/module.ts(15,44):
  TS2345: Argument of type 'typeof PrometheusDatasource' is not assignable to parameter of type 'DataSourceConstructor<DataSourceApi<never, PromOptions, {}>, never, PromOptions>'.
    Construct signature return types 'PrometheusDatasource' and 'DataSourceApi<never, PromOptions, {}>' are incompatible.
      The types of 'importQueries' are incompatible between these types.
        Type '((queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<PromQuery[]>) | undefined' is not assignable to type '((queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<never[]>) | undefined'.
          Type '(queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<PromQuery[]>' is not assignable to type '(queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<never[]>'.
            Type 'Promise<PromQuery[]>' is not assignable to type 'Promise<never[]>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/module.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/module.ts(16,19):
  TS2345: Argument of type 'typeof PromQueryEditor' is not assignable to parameter of type 'ComponentType<QueryEditorProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions, never>>'.
    Type 'typeof PromQueryEditor' is not assignable to type 'ComponentClass<QueryEditorProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions, never>, any>'.
      Types of parameters 'props' and 'props' are incompatible.
        Type 'QueryEditorProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions, never>' is not assignable to type 'Props'.
          Types of property 'datasource' are incompatible.
            Type 'DataSourceApi<never, PromOptions, {}>' is not assignable to type 'PrometheusDatasource'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/module.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/module.ts(18,32):
  TS2345: Argument of type 'NamedExoticComponent<Props>' is not assignable to parameter of type 'ComponentType<ExploreQueryFieldProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions>>'.
    Type 'NamedExoticComponent<Props>' is not assignable to type 'FunctionComponent<ExploreQueryFieldProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions>>'.
      Types of parameters 'props' and 'props' are incompatible.
        Type 'PropsWithChildren<ExploreQueryFieldProps<DataSourceApi<never, PromOptions, {}>, never, PromOptions>>' is not assignable to type 'Props'.
          Types of property 'datasource' are incompatible.
            Type 'DataSourceApi<never, PromOptions, {}>' is not assignable to type 'PrometheusDatasource'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/result_transformer.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/result_transformer.ts(17,65):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/types.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/types.ts(2,28):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(10,45):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(15,37):
  TS2307: Cannot find module '../../../features/dashboard/services/TimeSrv' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(17,72):
  TS2344: Type 'PrometheusDatasource' does not satisfy the constraint 'DataSourceApi<never, never, {}>'.
    Types of property 'importQueries' are incompatible.
      Type '((queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<PromQuery[]>) | undefined' is not assignable to type '((queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<never[]>) | undefined'.
        Type '(queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<PromQuery[]>' is not assignable to type '(queries: DataQuery[], originDataSource: DataSourceApi<DataQuery, DataSourceJsonData, {}>) => Promise<never[]>'.
          Type 'Promise<PromQuery[]>' is not assignable to type 'Promise<never[]>'.
            Type 'PromQuery[]' is not assignable to type 'never[]'.
              Type 'PromQuery' is not assignable to type 'never'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(27,3):
  TS2416: Property 'query' in type 'PrometheusVariableSupport' is not assignable to the same property in base type 'StandardVariableSupport<PrometheusDatasource, never, never>'.
    Type '(request: DataQueryRequest<PromQuery>) => Observable<DataQueryResponse>' is not assignable to type '(request: DataQueryRequest<never>) => Observable<DataQueryResponse>'.
      Type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.

  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts
  ERROR in /var/lib/grafana/plugins/prometheus2/src/variables.ts(50,3):
  TS2416: Property 'toDataQuery' in type 'PrometheusVariableSupport' is not assignable to the same property in base type 'StandardVariableSupport<PrometheusDatasource, never, never>'.
    Type '(query: StandardVariableQuery) => PromQuery' is not assignable to type '(query: StandardVariableQuery) => never'.
      Type 'PromQuery' is not assignable to type 'never'.

  Trace: Build failed
      at /var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/src/cli/utils/useSpinner.js:25:29
      at step (/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:143:27)
      at Object.throw (/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:124:57)
      at rejected (/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:115:69)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
✖ Build failed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

graph (folder called graph) part 1:

yarn run v1.22.5
$ grafana-toolkit plugin:dev
✔ Linting
⠋ Bundling plugin in dev mode  Starting type checking service...
  Using 1 worker with 2048MB memory limit
⠙ Bundling plugin in dev mode  ⚠ 「copy-webpack-plugin」: unable to locate '../LICENSE' at '/var/lib/grafana/plugins/graph2/LICENSE'
  ⚠ 「copy-webpack-plugin」: unable to locate '../CHANGELOG.md' at '/var/lib/grafana/plugins/graph2/CHANGELOG.md'
⠧ Bundling plugin in dev mode  Module not found: Error: Can't resolve '../../../core/core' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve '../../../features/dashboard/utils/loadSnapshotData' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve '../../../features/query/state/DashboardQueryRunner/utils' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve '../../../types/events' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/core' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/core' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/core_module' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/core_module' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/core_module' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/time_series2' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/utils/ConfigProvider' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/core/utils/ticks' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/features/alerting/state/ThresholdMapper' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/features/annotations/all' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/features/dashboard/state/actions' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/features/panel/metrics_panel_ctrl' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/features/panel/panellinks/linkSuppliers' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/store/store' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/types' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'app/types' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'tether-drop' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.crosshair' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.dashes' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.fillbelow' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.selection' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.stack' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.stackpercent' in '/var/lib/grafana/plugins/graph2/src'
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.time' in '/var/lib/grafana/plugins/graph2/src'
  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts(16,33):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts(58,24):
  TS2339: Property 'refresh' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts(60,24):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts(66,20):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/data_processor.ts(13,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/data_processor.ts(14,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts(2,27):
  TS2307: Cannot find module 'app/core/core' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts(3,28):
  TS2307: Cannot find module 'app/types' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts(84,30):
  TS2339: Property 'place_tt' does not exist on type 'JQLite'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts(203,35):
  TS2345: Argument of type '{ pos: { panelRelY: number; pageY: number; }; panel: any; }' is not assignable to parameter of type 'LegacyGraphHoverEventPayload'.
    Property 'point' is missing in type '{ pos: { panelRelY: number; pageY: number; }; panel: any; }' but required in type 'LegacyGraphHoverEventPayload'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(23,26):
  TS2307: Cannot find module 'app/core/utils/ticks' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(24,48):
  TS2307: Cannot find module 'app/core/core' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(28,30):
  TS2307: Cannot find module 'app/features/annotations/all' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(31,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(44,30):
  TS2307: Cannot find module 'app/core/utils/ConfigProvider' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(63,25):
  TS2307: Cannot find module 'app/features/dashboard/services/TimeSrv' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(64,28):
  TS2307: Cannot find module 'app/core/services/context_srv' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(65,39):
  TS2307: Cannot find module 'app/features/panel/panellinks/linkSuppliers' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(66,32):
  TS2307: Cannot find module '../../../features/dashboard/state' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(84,3):
  TS2564: Property 'legendElem' has no initializer and is not definitely assigned in the constructor.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(93,32):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(94,28):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(104,17):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(112,15):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(116,15):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(120,15):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(125,15):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(132,36):
  TS2769: No overload matches this call.
    The last overload gave the following error.
      Argument of type '(event: JQueryEventObject, ranges: any) => void' is not assignable to parameter of type 'false | TypeEventHandler<HTMLElement, undefined, HTMLElement, HTMLElement, "plotselected"> | null | undefined'.
        Type '(event: JQueryEventObject, ranges: any) => void' is not assignable to type 'TypeEventHandler<HTMLElement, undefined, HTMLElement, HTMLElement, "plotselected">'.
          Types of parameters 'event' and 't' are incompatible.
            Type 'TriggeredEvent<HTMLElement, undefined, HTMLElement, HTMLElement>' is missing the following properties from type 'JQueryEventObject': relatedTarget, cancelBubble, composed, defaultPrevented, and 9 more.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(133,33):
  TS2769: No overload matches this call.
    The last overload gave the following error.
      Argument of type '(event: JQueryEventObject, pos: any, item: any) => void' is not assignable to parameter of type 'false | TypeEventHandler<HTMLElement, undefined, HTMLElement, HTMLElement, "plotclick"> | null | undefined'.
        Type '(event: JQueryEventObject, pos: any, item: any) => void' is not assignable to type 'TypeEventHandler<HTMLElement, undefined, HTMLElement, HTMLElement, "plotclick">'.
          Types of parameters 'event' and 't' are incompatible.
            Type 'TriggeredEvent<HTMLElement, undefined, HTMLElement, HTMLElement>' is not assignable to type 'JQueryEventObject'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(149,35):
  TS2339: Property 'height' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(208,17):
  TS2339: Property 'otherPanelInFullscreenMode' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(570,67):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(645,21):
  TS2339: Property 'plot' does not exist on type 'JQueryStatic'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(647,26):
  TS2339: Property 'error' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(651,17):
  TS2339: Property 'error' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(656,17):
  TS2339: Property 'renderingCompleted' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(766,39):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(768,19):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(769,39):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(771,19):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(1021,45):
  TS2339: Property 'height' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/histogram.ts(1,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/jquery.flot.events.ts(758,3):
  TS2339: Property 'plot' does not exist on type 'JQueryStatic'.
  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/Legend.tsx(3,28):
  TS2307: Cannot find module 'app/core/core' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/Legend.tsx(92,37):
  TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'.
  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/Legend.tsx(304,21):
  TS2769: No overload matches this call.
    Overload 1 of 2, '(props: (LegendTableHeaderProps & LegendSortProps) | Readonly<LegendTableHeaderProps & LegendSortProps>): LegendTableHeaderItem', gave the following error.
      Type '(stat: Sort) => void' is not assignable to type '(statName: string) => void'.
        Types of parameters 'stat' and 'statName' are incompatible.
          Type 'string' is not assignable to type 'Sort'.
    Overload 2 of 2, '(props: LegendTableHeaderProps & LegendSortProps, context: any): LegendTableHeaderItem', gave the following error.
      Type '(stat: Sort) => void' is not assignable to type '(statName: string) => void'.
  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/LegendSeriesItem.tsx(3,28):
  TS2307: Cannot find module 'app/core/core' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(11,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(12,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(26,32):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(28,35):
  TS2307: Cannot find module 'app/features/dashboard/state/actions' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(29,26):
  TS2307: Cannot find module 'app/store/store' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(30,33):
  TS2307: Cannot find module 'app/features/alerting/state/ThresholdMapper' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(31,27):
  TS2307: Cannot find module '../../../core/core' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(32,30):
  TS2307: Cannot find module '../../../types/events' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(33,34):
  TS2307: Cannot find module 'app/features/panel/metrics_panel_ctrl' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(34,34):
  TS2307: Cannot find module '../../../features/dashboard/utils/loadSnapshotData' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(35,43):
  TS2307: Cannot find module '../../../features/query/state/DashboardQueryRunner/utils' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(155,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(156,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(157,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(158,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(159,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(161,10):
  TS2339: Property 'useDataFrames' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(162,45):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(165,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(166,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(170,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(174,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(178,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(184,34):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(186,12):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(191,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(195,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(199,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(200,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(204,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(208,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(234,12):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(235,12):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(237,10):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(245,19):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(252,14):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(253,30):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(258,14):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(259,57):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(262,10):
  TS2339: Property 'loading' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(263,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(280,49):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(329,49):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(332,40):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(336,14):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(346,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(347,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(353,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(357,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(358,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(359,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(363,35):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(366,12):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(369,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(373,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(377,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(377,47):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(378,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(382,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(382,36):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(383,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(387,25):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(390,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(397,28):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/series_overrides_ctrl.ts(2,24):
  TS2307: Cannot find module 'app/core/core_module' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/data_processor.test.ts(2,40):
  TS2307: Cannot find module 'app/features/query/state/runRequest' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph_ctrl.test.ts(3,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph_ctrl.test.ts(21,23):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph_ctrl.test.ts(37,34):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(2,34):
  TS2307: Cannot find module 'app/features/panel/metrics_panel_ctrl' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(3,27):
  TS2307: Cannot find module 'app/features/panel/panel_ctrl' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(4,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(6,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(10,32):
  TS2307: Cannot find module '../../../../features/dashboard/state' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(124,38):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(125,42):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/threshold_manager.test.ts(2,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/threshold_manager.ts(5,28):
  TS2307: Cannot find module 'app/types' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/threshold_manager.ts(6,27):
  TS2307: Cannot find module 'app/features/panel/panel_ctrl' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/threshold_manager.ts(7,24):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/thresholds_form.ts(1,24):
  TS2307: Cannot find module 'app/core/core_module' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/thresholds_form.ts(2,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/time_region_manager.ts(10,24):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.
  ERROR in /var/lib/grafana/plugins/graph2/src/time_regions_form.ts(1,24):
  TS2307: Cannot find module 'app/core/core_module' or its corresponding type declarations.

   Hash: 7812e79666fabcbf462d
  Version: webpack 4.41.5
  Time: 27134ms
  Built at: 07/09/2021 2:34:48 PM
                      Asset       Size  Chunks                   Chunk Names
                  README.md  292 bytes          [emitted]
           axes_editor.html   5.61 KiB          [emitted]
    img/icn-graph-panel.svg   1.63 KiB          [emitted]
                  module.js    242 KiB  module  [emitted]        module
              module.js.map    323 KiB  module  [emitted] [dev]  module
                plugin.json  320 bytes          [emitted]
           tab_display.html    4.5 KiB          [emitted]
            tab_legend.html    3.5 KiB          [emitted]
  tab_series_overrides.html   1.67 KiB          [emitted]
        tab_thresholds.html   64 bytes          [emitted]
      tab_time_regions.html   68 bytes          [emitted]
       thresholds_form.html   3.51 KiB          [emitted]
     time_regions_form.html   3.23 KiB          [emitted]
  Entrypoint module = module.js module.js.map
  [../node_modules/tslib/tslib.es6.js] 10 KiB {module} [built]
  [./GraphContextMenuCtrl.ts] 1.61 KiB {module} [built]
  [./GraphMigrations.ts] 635 bytes {module} [built]
  [./axes_editor.ts] 2.23 KiB {module} [built]
  [./data_processor.ts] 5.02 KiB {module} [built]
  [./graph.ts] 29.5 KiB {module} [built]
  [./module.ts] 12.5 KiB {module} [built]
  [./series_overrides_ctrl.ts] 4.75 KiB {module} [built]
  [./template.ts] 763 bytes {module} [built]
  [./thresholds_form.ts] 2.47 KiB {module} [built]
  [./time_regions_form.ts] 2.15 KiB {module} [built]
  [./utils.ts] 1.53 KiB {module} [built]
  [@grafana/data] external "@grafana/data" 42 bytes {module} [built]
  [@grafana/runtime] external "@grafana/runtime" 42 bytes {module} [built]
  [lodash] external "lodash" 42 bytes {module} [built]
      + 18 hidden modules

  WARNING in ./graph.ts 76:15-28
  "export '__spreadArray' was not found in 'tslib'
   @ ./module.ts

  WARNING in ./graph.ts 76:29-42
  "export '__spreadArray' was not found in 'tslib'
   @ ./module.ts

  WARNING in ./graph.ts 281:18-31
  "export '__spreadArray' was not found in 'tslib'
   @ ./module.ts

  WARNING in ./graph.ts 281:32-45
  "export '__spreadArray' was not found in 'tslib'
   @ ./module.ts

  WARNING in ./Legend/Legend.tsx 46:21-34
  "export '__spreadArray' was not found in 'tslib'
   @ ./graph.ts
   @ ./module.ts

  WARNING in unable to locate '../LICENSE' at '/var/lib/grafana/plugins/graph2/LICENSE'

  WARNING in unable to locate '../CHANGELOG.md' at '/var/lib/grafana/plugins/graph2/CHANGELOG.md'

  ERROR in ./module.ts
  Module not found: Error: Can't resolve '../../../core/core' in '/var/lib/grafana/plugins/graph2/src'
   @ ./module.ts 19:0-47 245:4-13

  ERROR in ./module.ts
  Module not found: Error: Can't resolve '../../../features/dashboard/utils/loadSnapshotData' in '/var/lib/grafana/plugins/graph2/src'
   @ ./module.ts 22:0-86 249:13-29

  ERROR in ./module.ts
  Module not found: Error: Can't resolve '../../../features/query/state/DashboardQueryRunner/utils' in '/var/lib/grafana/plugins/graph2/src'
   @ ./module.ts 23:0-101 277:25-50

  ERROR in ./module.ts
  Module not found: Error: Can't resolve '../../../types/events' in '/var/lib/grafana/plugins/graph2/src'
   @ ./module.ts 20:0-53 245:26-38

  ERROR in ./module.ts
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
   @ ./module.ts 10:0-37 140:46-52

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 22:0-37 293:17-23 586:8-14
   @ ./module.ts

  ERROR in ./thresholds_form.ts
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
   @ ./thresholds_form.ts 2:0-37 79:57-63 80:57-63
   @ ./module.ts

  ERROR in ./data_processor.ts
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
   @ ./data_processor.ts 5:0-37 70:37-43
   @ ./module.ts

  ERROR in ./threshold_manager.ts
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
   @ ./threshold_manager.ts 6:0-41 253:47-53 261:47-53 273:47-53 281:47-53
   @ ./graph.ts
   @ ./module.ts

  ERROR in ./time_region_manager.ts
  Module not found: Error: Can't resolve 'app/core/config' in '/var/lib/grafana/plugins/graph2/src'
   @ ./time_region_manager.ts 5:0-41 217:45-51
   @ ./graph.ts
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'app/core/core' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 15:0-63 121:4-22 1017:0-10
   @ ./module.ts

  ERROR in ./graph_tooltip.ts
  Module not found: Error: Can't resolve 'app/core/core' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph_tooltip.ts 2:0-42 175:4-13
   @ ./graph.ts
   @ ./module.ts

  ERROR in ./series_overrides_ctrl.ts
  Module not found: Error: Can't resolve 'app/core/core_module' in '/var/lib/grafana/plugins/graph2/src'
   @ ./series_overrides_ctrl.ts 3:0-46 132:0-10
   @ ./module.ts

  ERROR in ./thresholds_form.ts
  Module not found: Error: Can't resolve 'app/core/core_module' in '/var/lib/grafana/plugins/graph2/src'
   @ ./thresholds_form.ts 1:0-46 90:0-10
   @ ./module.ts

  ERROR in ./time_regions_form.ts
  Module not found: Error: Can't resolve 'app/core/core_module' in '/var/lib/grafana/plugins/graph2/src'
   @ ./time_regions_form.ts 1:0-46 80:0-10
   @ ./module.ts

  ERROR in ./data_processor.ts
  Module not found: Error: Can't resolve 'app/core/time_series2' in '/var/lib/grafana/plugins/graph2/src'
   @ ./data_processor.ts 4:0-47 67:21-31
   @ ./module.ts

graph part 2:

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'app/core/utils/ConfigProvider' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 27:0-61 30:30-42
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'app/core/utils/ticks' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 14:0-48 528:38-46 533:38-46 537:25-33
   @ ./module.ts

  ERROR in ./module.ts
  Module not found: Error: Can't resolve 'app/features/alerting/state/ThresholdMapper' in '/var/lib/grafana/plugins/graph2/src'
   @ ./module.ts 18:0-78 383:4-19

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'app/features/annotations/all' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 19:0-60 86:28-40
   @ ./module.ts

  ERROR in ./module.ts
  Module not found: Error: Can't resolve 'app/features/dashboard/state/actions' in '/var/lib/grafana/plugins/graph2/src'
   @ ./module.ts 16:0-73 307:27-44

  ERROR in ./module.ts
  Module not found: Error: Can't resolve 'app/features/panel/metrics_panel_ctrl' in '/var/lib/grafana/plugins/graph2/src'
   @ ./module.ts 21:0-73 433:2-18

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'app/features/panel/panellinks/linkSuppliers' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 29:0-84 296:41-62
   @ ./module.ts

  ERROR in ./module.ts
  Module not found: Error: Can't resolve 'app/store/store' in '/var/lib/grafana/plugins/graph2/src'
   @ ./module.ts 17:0-43 307:18-26

  ERROR in ./graph_tooltip.ts
  Module not found: Error: Can't resolve 'app/types' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph_tooltip.ts 3:0-39 175:19-29
   @ ./graph.ts
   @ ./module.ts

  ERROR in ./threshold_manager.ts
  Module not found: Error: Can't resolve 'app/types' in '/var/lib/grafana/plugins/graph2/src'
   @ ./threshold_manager.ts 5:0-39 61:30-40
   @ ./graph.ts
   @ ./module.ts

  ERROR in ./jquery.flot.events.ts
  Module not found: Error: Can't resolve 'tether-drop' in '/var/lib/grafana/plugins/graph2/src'
   @ ./jquery.flot.events.ts 7:0-31 26:19-23 85:17-21
   @ ./graph.ts
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 3:0-33
   @ ./module.ts

  ERROR in ./threshold_manager.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot' in '/var/lib/grafana/plugins/graph2/src'
   @ ./threshold_manager.ts 1:0-33
   @ ./graph.ts
   @ ./module.ts

  ERROR in ./time_region_manager.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot' in '/var/lib/grafana/plugins/graph2/src'
   @ ./time_region_manager.ts 2:0-33
   @ ./graph.ts
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.crosshair' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 9:0-43
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.dashes' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 10:0-40
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.fillbelow' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 8:0-43
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.selection' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 4:0-43
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.stack' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 6:0-39
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.stackpercent' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 7:0-46
   @ ./module.ts

  ERROR in ./graph.ts
  Module not found: Error: Can't resolve 'vendor/flot/jquery.flot.time' in '/var/lib/grafana/plugins/graph2/src'
   @ ./graph.ts 5:0-38
   @ ./module.ts

  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts(16,33):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts(58,24):
  TS2339: Property 'refresh' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts(60,24):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/axes_editor.ts(66,20):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/data_processor.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/data_processor.ts(13,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/data_processor.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/data_processor.ts(14,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts(2,27):
  TS2307: Cannot find module 'app/core/core' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts(3,28):
  TS2307: Cannot find module 'app/types' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts(84,30):
  TS2339: Property 'place_tt' does not exist on type 'JQLite'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph_tooltip.ts(203,35):
  TS2345: Argument of type '{ pos: { panelRelY: number; pageY: number; }; panel: any; }' is not assignable to parameter of type 'LegacyGraphHoverEventPayload'.
    Property 'point' is missing in type '{ pos: { panelRelY: number; pageY: number; }; panel: any; }' but required in type 'LegacyGraphHoverEventPayload'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(23,26):
  TS2307: Cannot find module 'app/core/utils/ticks' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(24,48):
  TS2307: Cannot find module 'app/core/core' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(28,30):
  TS2307: Cannot find module 'app/features/annotations/all' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(31,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(44,30):
  TS2307: Cannot find module 'app/core/utils/ConfigProvider' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(63,25):
  TS2307: Cannot find module 'app/features/dashboard/services/TimeSrv' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(64,28):
  TS2307: Cannot find module 'app/core/services/context_srv' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(65,39):
  TS2307: Cannot find module 'app/features/panel/panellinks/linkSuppliers' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(66,32):
  TS2307: Cannot find module '../../../features/dashboard/state' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(84,3):
  TS2564: Property 'legendElem' has no initializer and is not definitely assigned in the constructor.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(93,32):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(94,28):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(104,17):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(112,15):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(116,15):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(120,15):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(125,15):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(132,36):
  TS2769: No overload matches this call.
    The last overload gave the following error.
      Argument of type '(event: JQueryEventObject, ranges: any) => void' is not assignable to parameter of type 'false | TypeEventHandler<HTMLElement, undefined, HTMLElement, HTMLElement, "plotselected"> | null | undefined'.
        Type '(event: JQueryEventObject, ranges: any) => void' is not assignable to type 'TypeEventHandler<HTMLElement, undefined, HTMLElement, HTMLElement, "plotselected">'.
          Types of parameters 'event' and 't' are incompatible.
            Type 'TriggeredEvent<HTMLElement, undefined, HTMLElement, HTMLElement>' is missing the following properties from type 'JQueryEventObject': relatedTarget, cancelBubble, composed, defaultPrevented, and 9 more.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(133,33):
  TS2769: No overload matches this call.
    The last overload gave the following error.
      Argument of type '(event: JQueryEventObject, pos: any, item: any) => void' is not assignable to parameter of type 'false | TypeEventHandler<HTMLElement, undefined, HTMLElement, HTMLElement, "plotclick"> | null | undefined'.
        Type '(event: JQueryEventObject, pos: any, item: any) => void' is not assignable to type 'TypeEventHandler<HTMLElement, undefined, HTMLElement, HTMLElement, "plotclick">'.
          Types of parameters 'event' and 't' are incompatible.
            Type 'TriggeredEvent<HTMLElement, undefined, HTMLElement, HTMLElement>' is not assignable to type 'JQueryEventObject'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(149,35):
  TS2339: Property 'height' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(208,17):
  TS2339: Property 'otherPanelInFullscreenMode' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(570,67):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(645,21):
  TS2339: Property 'plot' does not exist on type 'JQueryStatic'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(647,26):
  TS2339: Property 'error' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(651,17):
  TS2339: Property 'error' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(656,17):
  TS2339: Property 'renderingCompleted' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(766,39):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(768,19):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(769,39):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(771,19):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/graph.ts(1021,45):
  TS2339: Property 'height' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/histogram.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/histogram.ts(1,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/jquery.flot.events.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/jquery.flot.events.ts(758,3):
  TS2339: Property 'plot' does not exist on type 'JQueryStatic'.

  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/Legend.tsx
  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/Legend.tsx(3,28):
  TS2307: Cannot find module 'app/core/core' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/Legend.tsx
  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/Legend.tsx(92,37):
  TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'.

  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/Legend.tsx
  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/Legend.tsx(304,21):
  TS2769: No overload matches this call.
    Overload 1 of 2, '(props: (LegendTableHeaderProps & LegendSortProps) | Readonly<LegendTableHeaderProps & LegendSortProps>): LegendTableHeaderItem', gave the following error.
      Type '(stat: Sort) => void' is not assignable to type '(statName: string) => void'.
        Types of parameters 'stat' and 'statName' are incompatible.
          Type 'string' is not assignable to type 'Sort'.
    Overload 2 of 2, '(props: LegendTableHeaderProps & LegendSortProps, context: any): LegendTableHeaderItem', gave the following error.
      Type '(stat: Sort) => void' is not assignable to type '(statName: string) => void'.

  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/LegendSeriesItem.tsx
  ERROR in /var/lib/grafana/plugins/graph2/src/Legend/LegendSeriesItem.tsx(3,28):
  TS2307: Cannot find module 'app/core/core' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(11,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(12,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(26,32):
  TS2307: Cannot find module '@grafana/runtime' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(28,35):
  TS2307: Cannot find module 'app/features/dashboard/state/actions' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(29,26):
  TS2307: Cannot find module 'app/store/store' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(30,33):
  TS2307: Cannot find module 'app/features/alerting/state/ThresholdMapper' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(31,27):
  TS2307: Cannot find module '../../../core/core' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(32,30):
  TS2307: Cannot find module '../../../types/events' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(33,34):
  TS2307: Cannot find module 'app/features/panel/metrics_panel_ctrl' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(34,34):
  TS2307: Cannot find module '../../../features/dashboard/utils/loadSnapshotData' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(35,43):
  TS2307: Cannot find module '../../../features/query/state/DashboardQueryRunner/utils' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(155,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(156,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(157,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(158,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(159,19):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(161,10):
  TS2339: Property 'useDataFrames' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(162,45):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(165,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(166,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(170,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(174,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(178,10):
  TS2339: Property 'events' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(184,34):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(186,12):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(191,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(195,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(199,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(200,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(204,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(208,10):
  TS2339: Property 'addEditorTab' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(234,12):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(235,12):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(237,10):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(245,19):
  TS2339: Property 'range' does not exist on type 'GraphCtrl'.

graph part 3:

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(252,14):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(253,30):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(258,14):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(259,57):
  TS2339: Property 'panelData' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(262,10):
  TS2339: Property 'loading' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(263,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(280,49):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(329,49):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(332,40):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(336,14):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(346,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(347,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(353,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(357,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(358,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(359,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(363,35):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(366,12):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(369,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(373,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(377,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(377,47):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(378,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(382,10):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(382,36):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(383,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(387,25):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(390,10):
  TS2551: Property 'render' does not exist on type 'GraphCtrl'. Did you mean 'onRender'?

  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/module.ts(397,28):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/series_overrides_ctrl.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/series_overrides_ctrl.ts(2,24):
  TS2307: Cannot find module 'app/core/core_module' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/data_processor.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/data_processor.test.ts(2,40):
  TS2307: Cannot find module 'app/features/query/state/runRequest' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph_ctrl.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph_ctrl.test.ts(3,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph_ctrl.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph_ctrl.test.ts(21,23):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph_ctrl.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph_ctrl.test.ts(37,34):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(2,34):
  TS2307: Cannot find module 'app/features/panel/metrics_panel_ctrl' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(3,27):
  TS2307: Cannot find module 'app/features/panel/panel_ctrl' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(4,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(6,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(10,32):
  TS2307: Cannot find module '../../../../features/dashboard/state' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(124,38):
  TS2339: Property 'panel' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/graph.test.ts(125,42):
  TS2339: Property 'dashboard' does not exist on type 'GraphCtrl'.

  ERROR in /var/lib/grafana/plugins/graph2/src/specs/threshold_manager.test.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/specs/threshold_manager.test.ts(2,24):
  TS2307: Cannot find module 'app/core/time_series2' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/threshold_manager.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/threshold_manager.ts(5,28):
  TS2307: Cannot find module 'app/types' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/threshold_manager.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/threshold_manager.ts(6,27):
  TS2307: Cannot find module 'app/features/panel/panel_ctrl' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/threshold_manager.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/threshold_manager.ts(7,24):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/thresholds_form.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/thresholds_form.ts(1,24):
  TS2307: Cannot find module 'app/core/core_module' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/thresholds_form.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/thresholds_form.ts(2,20):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/time_region_manager.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/time_region_manager.ts(10,24):
  TS2307: Cannot find module 'app/core/config' or its corresponding type declarations.

  ERROR in /var/lib/grafana/plugins/graph2/src/time_regions_form.ts
  ERROR in /var/lib/grafana/plugins/graph2/src/time_regions_form.ts(1,24):
  TS2307: Cannot find module 'app/core/core_module' or its corresponding type declarations.

  Trace: Build failed
      at /var/lib/grafana/plugins/graph2/node_modules/@grafana/toolkit/src/cli/utils/useSpinner.js:25:29
      at step (/var/lib/grafana/plugins/graph2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:143:27)
      at Object.throw (/var/lib/grafana/plugins/graph2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:124:57)
      at rejected (/var/lib/grafana/plugins/graph2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:115:69)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
✖ Build failed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Noticed that the core, vendor, and other modules are one level up in the grafana repo under app. Copied these into the src folder of the plugin and tested again. Narrowed down to same five errors shown below for prometheus data source and graph panel. I had added modules related to lodash and react from main grafana package.json and still got these errors.

For graph panel, also saw error ‘Couldn’t find binary git’ for module tether drop when attempting ‘yarn install --pure-lockfile’. This is line 302 on the main grafana package.json. Hence, I had to test plugin build without tether-drop module in package.json.

yarn run v1.22.5
$ grafana-toolkit plugin:dev
⠹ Linting
  /var/lib/grafana/plugins/prometheus2/src/app/app.ts
    10:1  error  Definition for rule 'lodash/import-scope' was not found  lodash/import-scope  /var/lib/grafana/plugins/prometheus2/src/app/core/lodash_extended.ts
    1:1  error  Definition for rule 'lodash/import-scope' was not found  lodash/import-scope  /var/lib/grafana/plugins/prometheus2/src/app/features/plugins/plugin_loader.ts
    1:1  error  Definition for rule 'lodash/import-scope' was not found  lodash/import-scope  /var/lib/grafana/plugins/prometheus2/src/app/features/dashboard/services/DashboardLoaderSrv.ts
    2:1  error  Definition for rule 'lodash/import-scope' was not found  lodash/import-scope  /var/lib/grafana/plugins/prometheus2/src/app/features/dashboard/components/PanelEditor/DynamicConfigValueEditor.tsx
    50:5  error  Component definition is missing display name  react/display-name  ✖ 5 problems (5 errors, 0 warnings)  Trace: Error: 5 linting errors found in 1355 files
      at /var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/src/cli/tasks/plugin.build.js:125:31
      at step (/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:143:27)
      at Object.next (/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:124:57)
      at fulfilled (/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:114:62)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at /var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/src/cli/utils/useSpinner.js:25:29
      at step (/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:143:27)
      at Object.throw (/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:124:57)
      at rejected (/var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/node_modules/tslib/tslib.js:115:69)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
✖ 5 linting errors found in 1355 files
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Adding more modules related to react removed last error. Removing lines in core library files that contained ‘eslint-disable-next-line lodash/import-scope’ fixed those. This resulted in a new set of errors related to more missing modules (jest, redux, css, fast-json-patch, tslib, whatwg-fetch, angular, search-query-parser, testing-library, @grafana/runtime, @reduxjs/toolkit).

Once those were added, the following was the output of ‘yarn build’, while ‘yarn dev’ had too many errors to list. Appears to be issues with running tests.

yarn run v1.22.5
$ grafana-toolkit plugin:build
  Using Node.js v14.17.2
  Using @grafana/toolkit v8.0.5
⠋ Preparing  Created: /var/lib/grafana/plugins/prometheus2/tsconfig.json
  Created: /var/lib/grafana/plugins/prometheus2/.prettierrc.js
✔ Preparing
✔ Linting
⠋ Running tests  Using standard jest plugin config /var/lib/grafana/plugins/prometheus2/node_modules/@grafana/toolkit/src/config/jest.plugin.config.local.js
ts-jest[config] (WARN) The option `tsConfig` is deprecated and will be removed in ts-jest 27, use `tsconfig` instead
 FAIL  src/datasource.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      29 | jest.mock('@grafana/runtime', () => ({
      30 |   // @ts-ignore
    > 31 |   ...jest.requireActual('@grafana/runtime'),
         |           ^
      32 |   getBackendSrv: () => ({
      33 |     fetch: fetchMock,
      34 |   }),

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.development.js:9:10)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.js:6:20)
      at src/datasource.test.ts:31:11
      at Object.<anonymous> (src/datasource.ts:16:1)
      at Object.<anonymous> (src/datasource.test.ts:14:1)

 FAIL  src/app/features/dashboard/state/DashboardMigrator.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      15 | } from 'lodash';
      16 | // Constants
    > 17 | import { DEFAULT_ANNOTATION_COLOR } from '@grafana/ui';
         | ^
      18 | import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN, GRID_COLUMN_COUNT, REPEAT_DIR_VERTICAL } from 'app/core/constants';
      19 | // Utils & Services
      20 | import { contextSrv } from 'app/core/services/context_srv';

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (src/app/features/dashboard/state/DashboardModel.ts:17:1)
      at Object.<anonymous> (src/app/features/dashboard/state/DashboardMigrator.test.ts:2:1)

 FAIL  src/app/features/variables/pickers/OptionsPicker/reducer.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      1 | import React, { FormEvent, PropsWithChildren, ReactElement, useCallback } from 'react';
    > 2 | import { InlineField, TextArea, useStyles } from '@grafana/ui';
        | ^
      3 | import { GrafanaTheme } from '@grafana/data';
      4 | import { css } from '@emotion/css';
      5 |

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (src/app/features/variables/editor/VariableTextAreaField.tsx:2:1)
      at Object.<anonymous> (src/app/features/variables/editor/LegacyVariableQueryEditor.tsx:5:1)
      at Object.<anonymous> (src/app/features/variables/guard.ts:27:1)
      at Object.<anonymous> (src/app/features/variables/pickers/OptionsPicker/reducer.ts:5:1)
      at Object.<anonymous> (src/app/features/variables/pickers/OptionsPicker/reducer.test.ts:2:1)

 FAIL  src/app/features/variables/state/actions.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      2 | import { cloneDeep, defaultsDeep, isArray, isEqual, keys } from 'lodash';
      3 | // Utils
    > 4 | import { getTemplateSrv } from '@grafana/runtime';
        | ^
      5 | import { getNextRefIdChar } from 'app/core/utils/query';
      6 | // Types
      7 | import {

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.development.js:9:10)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.js:6:20)
      at Object.<anonymous> (src/app/features/dashboard/state/PanelModel.ts:4:1)
      at Object.<anonymous> (src/app/features/dashboard/components/PanelEditor/state/reducers.ts:2:1)
      at Object.<anonymous> (src/app/features/dashboard/state/reducers.ts:13:1)
      at Object.<anonymous> (src/app/features/variables/state/helpers.ts:8:1)
      at Object.<anonymous> (src/app/features/variables/state/actions.test.ts:3:1)

 FAIL  src/app/features/variables/query/actions.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

    > 1 | import { config, GrafanaBootConfig } from '@grafana/runtime';
        | ^
      2 | // Legacy binding paths
      3 | export { config, GrafanaBootConfig as Settings };
      4 |

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.development.js:9:10)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.js:6:20)
      at Object.<anonymous> (src/app/core/config.ts:1:1)
      at Object.<anonymous> (src/app/core/reducers/navModel.ts:4:1)
      at Object.<anonymous> (src/app/core/actions/index.ts:2:1)
      at Object.<anonymous> (src/app/features/variables/state/actions.ts:22:1)
      at Object.<anonymous> (src/app/features/variables/query/adapter.ts:6:1)
      at Object.<anonymous> (src/app/features/variables/adapters.ts:8:1)
      at Object.<anonymous> (src/app/features/variables/query/actions.test.ts:3:1)

 FAIL  src/app/features/templating/template_srv.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      1 | import { isString, isArray, isEqual } from 'lodash';
      2 | import { ScopedVars, UrlQueryMap, VariableType } from '@grafana/data';
    > 3 | import { getTemplateSrv } from '@grafana/runtime';
        | ^
      4 |
      5 | import { ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE } from './state/types';
      6 | import { QueryVariableModel, VariableModel, VariableRefresh } from './types';

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.development.js:9:10)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.js:6:20)
      at Object.<anonymous> (src/app/features/variables/utils.ts:3:1)
      at Object.<anonymous> (src/app/features/templating/template_srv.ts:4:1)
      at Object.<anonymous> (src/test/helpers/initTemplateSrv.ts:3:1)
      at Object.<anonymous> (src/app/features/templating/template_srv.test.ts:2:1)

 FAIL  src/app/core/specs/backend_srv.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

    > 1 | import { config, GrafanaBootConfig } from '@grafana/runtime';
        | ^
      2 | // Legacy binding paths
      3 | export { config, GrafanaBootConfig as Settings };
      4 |

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.development.js:9:10)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.js:6:20)
      at Object.<anonymous> (src/app/core/config.ts:1:1)
      at Object.<anonymous> (src/app/core/services/backend_srv.ts:9:1)
      at Object.<anonymous> (src/app/core/specs/backend_srv.test.ts:6:1)

 FAIL  src/app/core/logs_model.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      1 | import { size } from 'lodash';
    > 2 | import { colors, ansicolor } from '@grafana/ui';
        | ^
      3 |
      4 | import {
      5 |   Labels,

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (src/app/core/logs_model.ts:2:1)
      at Object.<anonymous> (src/app/core/logs_model.test.ts:11:1)

 FAIL  src/app/features/dashboard/state/DashboardModel.repeat.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      15 | } from 'lodash';
      16 | // Constants
    > 17 | import { DEFAULT_ANNOTATION_COLOR } from '@grafana/ui';
         | ^
      18 | import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN, GRID_COLUMN_COUNT, REPEAT_DIR_VERTICAL } from 'app/core/constants';
      19 | // Utils & Services
      20 | import { contextSrv } from 'app/core/services/context_srv';

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (src/app/features/dashboard/state/DashboardModel.ts:17:1)
      at Object.<anonymous> (src/app/features/dashboard/state/index.ts:1:1)
      at Object.<anonymous> (src/test/helpers/getDashboardModel.ts:1:1)
      at Object.<anonymous> (src/app/features/dashboard/state/DashboardModel.repeat.test.ts:4:1)

 FAIL  src/app/features/dashboard/state/DashboardModel.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      15 | } from 'lodash';
      16 | // Constants
    > 17 | import { DEFAULT_ANNOTATION_COLOR } from '@grafana/ui';
         | ^
      18 | import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN, GRID_COLUMN_COUNT, REPEAT_DIR_VERTICAL } from 'app/core/constants';
      19 | // Utils & Services
      20 | import { contextSrv } from 'app/core/services/context_srv';

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (src/app/features/dashboard/state/DashboardModel.ts:17:1)
      at Object.<anonymous> (src/app/features/dashboard/state/DashboardModel.test.ts:2:1)

 FAIL  src/language_provider.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      4 |
      5 | import { dateTime, HistoryItem, LanguageProvider } from '@grafana/data';
    > 6 | import { CompletionItem, CompletionItemGroup, SearchFunctionType, TypeaheadInput, TypeaheadOutput } from '@grafana/ui';
        | ^
      7 |
      8 | import {
      9 |   addLimitInfo,

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (src/language_provider.ts:6:1)
      at Object.<anonymous> (src/language_provider.test.ts:3:1)

 FAIL  src/app/features/variables/pickers/OptionsPicker/actions.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      31 |
      32 | jest.mock('@grafana/runtime', () => {
    > 33 |   const original = jest.requireActual('@grafana/runtime');
         |                         ^
      34 |
      35 |   return {
      36 |     ...original,

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.development.js:9:10)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.js:6:20)
      at src/app/features/variables/pickers/OptionsPicker/actions.test.ts:33:25
      at Object.<anonymous> (src/app/features/dashboard/state/PanelModel.ts:4:1)
      at Object.<anonymous> (src/app/features/dashboard/components/PanelEditor/state/reducers.ts:2:1)
      at Object.<anonymous> (src/app/features/dashboard/state/reducers.ts:13:1)
      at Object.<anonymous> (src/app/features/variables/state/helpers.ts:8:1)
      at Object.<anonymous> (src/app/features/variables/pickers/OptionsPicker/actions.test.ts:2:1)

 FAIL  src/app/features/variables/state/sharedReducer.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

    > 1 | import { config, GrafanaBootConfig } from '@grafana/runtime';
        | ^
      2 | // Legacy binding paths
      3 | export { config, GrafanaBootConfig as Settings };
      4 |

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.development.js:9:10)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.js:6:20)
      at Object.<anonymous> (src/app/core/config.ts:1:1)
      at Object.<anonymous> (src/app/core/reducers/navModel.ts:4:1)
      at Object.<anonymous> (src/app/core/actions/index.ts:2:1)
      at Object.<anonymous> (src/app/features/variables/state/actions.ts:22:1)
      at Object.<anonymous> (src/app/features/variables/query/adapter.ts:6:1)
      at Object.<anonymous> (src/app/features/variables/adapters.ts:8:1)
      at Object.<anonymous> (src/app/features/variables/state/sharedReducer.ts:6:1)
      at Object.<anonymous> (src/app/features/variables/state/sharedReducer.test.ts:5:1)

 FAIL  src/app/features/variables/query/reducer.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      2 | import { cloneDeep, defaultsDeep, isArray, isEqual, keys } from 'lodash';
      3 | // Utils
    > 4 | import { getTemplateSrv } from '@grafana/runtime';
        | ^
      5 | import { getNextRefIdChar } from 'app/core/utils/query';
      6 | // Types
      7 | import {

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.development.js:9:10)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.js:6:20)
      at Object.<anonymous> (src/app/features/dashboard/state/PanelModel.ts:4:1)
      at Object.<anonymous> (src/app/features/dashboard/components/PanelEditor/state/reducers.ts:2:1)
      at Object.<anonymous> (src/app/features/dashboard/state/reducers.ts:13:1)
      at Object.<anonymous> (src/app/features/variables/state/helpers.ts:8:1)
      at Object.<anonymous> (src/app/features/variables/query/reducer.test.ts:10:1)

 FAIL  src/app/features/variables/state/processVariable.test.ts
  ● Test suite failed to run

    ReferenceError: matchMedia is not defined

      2 | import { cloneDeep, defaultsDeep, isArray, isEqual, keys } from 'lodash';
      3 | // Utils
    > 4 | import { getTemplateSrv } from '@grafana/runtime';
        | ^
      5 | import { getNextRefIdChar } from 'app/core/utils/query';
      6 | // Types
      7 | import {

      at setPxRatio (node_modules/@grafana/ui/index.development.js:109546:2)
      at Object.<anonymous> (node_modules/@grafana/ui/index.development.js:109604:1)
      at Object.<anonymous> (node_modules/@grafana/ui/index.js:6:20)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.development.js:9:10)
      at Object.<anonymous> (node_modules/@grafana/runtime/index.js:6:20)
      at Object.<anonymous> (src/app/features/dashboard/state/PanelModel.ts:4:1)
      at Object.<anonymous> (src/app/features/dashboard/components/PanelEditor/state/reducers.ts:2:1)
      at Object.<anonymous> (src/app/features/dashboard/state/reducers.ts:13:1)
      at Object.<anonymous> (src/app/features/variables/state/helpers.ts:8:1)
      at Object.<anonymous> (src/app/features/variables/state/processVariable.test.ts:3:1)

 PASS  src/result_transformer.test.ts (10.984 s)

 RUNS  src/app/features/variables/adhoc/actions.test.ts

<--- Last few GCs --->

[9300:0x520d990]   252072 ms: Mark-sweep (reduce) 1935.4 (1952.1) -> 1933.3 (1952.1) MB, 1718.4 / 0.1 ms  (average mu = 0.094, current mu = 0.000) last resort GC in old space requested
[9300:0x520d990]   253456 ms: Mark-sweep (reduce) 1933.3 (1951.1) -> 1933.1 (1950.6) MB, 1384.4 / 0.1 ms  (average mu = 0.053, current mu = 0.000) last resort GC in old space requested


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xa24ed0 node::Abort() [/usr/bin/node]
 2: 0x966115 node::FatalError(char const*, char const*) [/usr/bin/node]
 3: 0xb9acde v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
 4: 0xb9b057 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
 5: 0xd56ea5  [/usr/bin/node]
 6: 0xd57a2f  [/usr/bin/node]
 7: 0xd65abb v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/bin/node]
 8: 0xd6967c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/bin/node]
 9: 0xd37d2b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/bin/node]
10: 0x108035f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/usr/bin/node]
11: 0x1427079  [/usr/bin/node]
error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

These errors seem related to this ticket. Tested with individual @grafana libraries using 8.0.2 as ticket suggests.

This opened up new missing module errors.

Reached a point where missing modules was no longer the issue, and appears to be errors specifically related to script functions since they are being used in a different way than originally intended. At this point will put aside. If its possible for Grafana to have core libraries customizable, i.e. Prom data source that could be pre-configured with settings as a separate plugin, or same with graph/stat/etc plugins having metrics pre-defined, might be helpful for dashboard automation.