Redash build errors on npm / frontend

Issue Summary

A summary of the issue and the browser/OS environment in which it occurs.

  1. Followed the manual https://redash.io/help/open-source/dev-guide/docker
  2. Want to build assets with npm run build

Ran into two fixable dependency issues:

npm i --save-dev @types/jest
npm i --save-dev babel-plugin-module-resolver

Via:

  1. Build error with Typescript related issues (see build log in details)

Technical details:

  • Redash Version: from Git
  • Browser/OS: /
  • How did you install Redash: onpremise, for a pre-eval

I use node version 12. Tried out other versions as well. The install guide should list compatible versions.

-> Open the build error log
> @redash/viz@1.0.0 type-gen /home/marius/redash/viz-lib
> tsc --emitDeclarationOnly

src/components/ColorPicker/Input.tsx:3:23 - error TS7016: Could not find a declaration file for module 'tinycolor2'. '/home/marius/redash/node_modules/tinycolor2/tinycolor.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/tinycolor2` if it exists or add a new declaration (.d.ts) file containing `declare module 'tinycolor2';`

3 import tinycolor from "tinycolor2";
                        ~~~~~~~~~~~~

src/components/ColorPicker/utils.ts:2:23 - error TS7016: Could not find a declaration file for module 'tinycolor2'. '/home/marius/redash/node_modules/tinycolor2/tinycolor.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/tinycolor2` if it exists or add a new declaration (.d.ts) file containing `declare module 'tinycolor2';`

2 import tinycolor from "tinycolor2";
                        ~~~~~~~~~~~~

src/components/ErrorBoundary.tsx:3:19 - error TS7016: Could not find a declaration file for module 'debug'. '/home/marius/redash/node_modules/debug/src/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`

3 import debug from "debug";
                    ~~~~~~~

src/components/HtmlContent.tsx:9:7 - error TS2578: Unused '@ts-expect-error' directive.

...
src/visualizations/box-plot/d3box.ts:195:21 - error TS7006: Parameter 'i' implicitly has an 'any' type.

195         .attr("cy", i => x1(d[i]))
                        ~

src/visualizations/box-plot/d3box.ts:201:21 - error TS7006: Parameter 'i' implicitly has an 'any' type.

201         .attr("cy", i => x1(d[i]))
                        ~

src/visualizations/box-plot/d3box.ts:224:22 - error TS7006: Parameter 'd' implicitly has an 'any' type.

224         .attr("dx", (d, i) => (i & 1 ? 6 : -6))
                         ~

src/visualizations/box-plot/d3box.ts:224:25 - error TS7006: Parameter 'i' implicitly has an 'any' type.

224         .attr("dx", (d, i) => (i & 1 ? 6 : -6))
                            ~

src/visualizations/box-plot/d3box.ts:225:21 - error TS7006: Parameter 'd' implicitly has an 'any' type.

225         .attr("x", (d, i) => (i & 1 ? width : 0))
                        ~

src/visualizations/box-plot/d3box.ts:225:24 - error TS7006: Parameter 'i' implicitly has an 'any' type.

225         .attr("x", (d, i) => (i & 1 ? width : 0))
                           ~

src/visualizations/box-plot/d3box.ts:227:31 - error TS7006: Parameter 'd' implicitly has an 'any' type.

227         .attr("text-anchor", (d, i) => (i & 1 ? "start" : "end"))
                                  ~

src/visualizations/box-plot/d3box.ts:227:34 - error TS7006: Parameter 'i' implicitly has an 'any' type.

227         .attr("text-anchor", (d, i) => (i & 1 ? "start" : "end"))
                                     ~

src/visualizations/box-plot/d3box.ts:276:5 - error TS2578: Unused '@ts-expect-error' directive.

276     // @ts-expect-error ts-migrate(2339) FIXME: Property 'flush' does not exist on type '(callback... Remove this comment to see the full error message
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/box-plot/d3box.ts:306:5 - error TS2578: Unused '@ts-expect-error' directive.



src/visualizations/chart/Renderer/initChart.ts:33:5 - error TS2578: Unused '@ts-expect-error' directive.

33     // @ts-expect-error ts-migrate(7023) FIXME: 'process' implicitly has return type 'any' because... Remove this comment to see the full error message
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/chart/Renderer/initChart.ts:129:7 - error TS2578: Unused '@ts-expect-error' directive.

129       // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ dragmode: string | boolean; }'... Remove this comment to see the full error message
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/chart/plotly/index.ts:1:20 - error TS7016: Could not find a declaration file for module 'plotly.js/lib/core'. '/home/marius/redash/node_modules/plotly.js/lib/core.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/plotly.js` if it exists or add a new declaration (.d.ts) file containing `declare module 'plotly.js/lib/core';`

1 import Plotly from "plotly.js/lib/core";
                     ~~~~~~~~~~~~~~~~~~~~

src/visualizations/chart/plotly/index.ts:20:1 - error TS2578: Unused '@ts-expect-error' directive.

20 // @ts-expect-error ts-migrate(2339) FIXME: Property 'register' does not exist on type 'typeof... Remove this comment to see the full error message
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/chart/plotly/index.ts:22:1 - error TS2578: Unused '@ts-expect-error' directive.

22 // @ts-expect-error ts-migrate(2339) FIXME: Property 'setPlotConfig' does not exist on type 't... Remove this comment to see the full error message
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/chart/plotly/preparePieData.ts:2:16 - error TS7016: Could not find a declaration file for module 'd3'. '/home/marius/redash/node_modules/d3/d3.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/d3` if it exists or add a new declaration (.d.ts) file containing `declare module 'd3';`

2 import d3 from "d3";
                 ~~~~

src/visualizations/chart/plotly/preparePieData.ts:99:3 - error TS2578: Unused '@ts-expect-error' directive.

99   // @ts-expect-error ts-migrate(2339) FIXME: Property 'scale' does not exist on type 'typeof im... Remove this comment to see the full error message
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/choropleth/Editor/utils.ts:2:15 - error TS7016: Could not find a declaration file for module 'leaflet'. '/home/marius/redash/node_modules/leaflet/dist/leaflet-src.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/leaflet` if it exists or add a new declaration (.d.ts) file containing `declare module 'leaflet';`

2 import L from "leaflet";
                ~~~~~~~~~

src/visualizations/choropleth/Editor/utils.ts:21:5 - error TS2578: Unused '@ts-expect-error' directive.

21     // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'object' is not assignable to par... Remove this comment to see the full error message
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/choropleth/Editor/utils.ts:26:9 - error TS2578: Unused '@ts-expect-error' directive.

26         // @ts-expect-error ts-migrate(2551) FIXME: Property '_southWest' does not exist on type 'LatL... Remove this comment to see the full error message
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/choropleth/Editor/utils.ts:28:9 - error TS2578: Unused '@ts-expect-error' directive.

28         // @ts-expect-error ts-migrate(2551) FIXME: Property '_northEast' does not exist on type 'LatL... Remove this comment to see the full error message
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/choropleth/Renderer/initChoropleth.tsx:4:15 - error TS7016: Could not find a declaration file for module 'leaflet'. '/home/marius/redash/node_modules/leaflet/dist/leaflet-src.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/leaflet` if it exists or add a new declaration (.d.ts) file containing `declare module 'leaflet';`

...

2 import chroma from "chroma-js";
                     ~~~~~~~~~~~

src/visualizations/map/initMap.ts:3:15 - error TS7016: Could not find a declaration file for module 'leaflet'. '/home/marius/redash/node_modules/leaflet/dist/leaflet-src.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/leaflet` if it exists or add a new declaration (.d.ts) file containing `declare module 'leaflet';`

3 import L from "leaflet";
                ~~~~~~~~~

src/visualizations/map/initMap.ts:30:1 - error TS2578: Unused '@ts-expect-error' directive.

30 // @ts-expect-error ts-migrate(2339) FIXME: Property '_getIconUrl' does not exist on type 'Def... Remove this comment to see the full error message
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/map/initMap.ts:50:1 - error TS2578: Unused '@ts-expect-error' directive.

50 // @ts-expect-error ts-migrate(2339) FIXME: Property 'MarkerClusterIcon' does not exist on typ... Remove this comment to see the full error message
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/map/initMap.ts:82:3 - error TS2578: Unused '@ts-expect-error' directive.

82   // @ts-expect-error ts-migrate(2339) FIXME: Property 'BeautifyIcon' does not exist on type 'ty... Remove this comment to see the full error message
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/map/initMap.ts:101:3 - error TS2578: Unused '@ts-expect-error' directive.

101   // @ts-expect-error ts-migrate(2339) FIXME: Property 'markerClusterGroup' does not exist on ty... Remove this comment to see the full error message
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/map/initMap.ts:104:7 - error TS2578: Unused '@ts-expect-error' directive.

104       // @ts-expect-error ts-migrate(2339) FIXME: Property 'markerClusterIcon' does not exist on typ... Remove this comment to see the full error message
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/map/initMap.ts:165:5 - error TS2578: Unused '@ts-expect-error' directive.

165     // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ center: [number, number]; zoom... Remove this comment to see the full error message
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/map/initMap.ts:193:29 - error TS7006: Parameter 'layer' implicitly has an 'any' type.

193     _markerLayers.eachLayer(layer => {
                                ~~~~~

src/visualizations/map/prepareData.ts:1:16 - error TS7016: Could not find a declaration file for module 'd3'. '/home/marius/redash/node_modules/d3/d3.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/d3` if it exists or add a new declaration (.d.ts) file containing `declare module 'd3';`

1 import d3 from "d3";
                 ~~~~

src/visualizations/map/prepareData.ts:5:3 - error TS2578: Unused '@ts-expect-error' directive.

5   // @ts-expect-error ts-migrate(2339) FIXME: Property 'scale' does not exist on type 'typeof im... Remove this comment to see the full error message
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/sankey/d3sankey.ts:3:16 - error TS7016: Could not find a declaration file for module 'd3'. '/home/marius/redash/node_modules/d3/d3.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/d3` if it exists or add a new declaration (.d.ts) file containing `declare module 'd3';`

3 import d3 from "d3";
                 ~~~~

src/visualizations/sankey/d3sankey.ts:119:21 - error TS7006: Parameter 'n' implicitly has an 'any' type.

119       d3.max(nodes, n => n.x),
                        ~

src/visualizations/sankey/d3sankey.ts:127:7 - error TS2578: Unused '@ts-expect-error' directive.

127       // @ts-expect-error
          ~~~~~~~~~~~~~~~~~~~

src/visualizations/sankey/d3sankey.ts:141:11 - error TS2578: Unused '@ts-expect-error' directive.

141           // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/sankey/d3sankey.ts:147:9 - error TS2578: Unused '@ts-expect-error' directive.

147         // @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/sankey/initSankey.ts:19:16 - error TS7016: Could not find a declaration file for module 'd3'. '/home/marius/redash/node_modules/d3/d3.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/d3` if it exists or add a new declaration (.d.ts) file containing `declare module 'd3';`

19 import d3 from "d3";
                  ~~~~

src/visualizations/sankey/initSankey.ts:102:3 - error TS2578: Unused '@ts-expect-error' directive.

102   // @ts-expect-error ts-migrate(2339) FIXME: Property 'scale' does not exist on type 'typeof im... Remove this comment to see the full error message
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/sankey/initSankey.ts:113:5 - error TS2578: Unused '@ts-expect-error' directive.

113     // @ts-expect-error ts-migrate(2339) FIXME: Property 'nest' does not exist on type 'typeof imp... Remove this comment to see the full error message
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/sankey/initSankey.ts:181:3 - error TS2578: Unused '@ts-expect-error' directive.

181   // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~

src/visualizations/sankey/initSankey.ts:235:15 - error TS7006: Parameter 'l' implicitly has an 'any' type.

235       .filter(l => l.target.name !== "Exit")
                  ~

src/visualizations/sankey/initSankey.ts:238:30 - error TS7006: Parameter 'd' implicitly has an 'any' type.

238       .style("stroke-width", d => Math.max(1, d.dy))
                                 ~

src/visualizations/sankey/initSankey.ts:239:14 - error TS7006: Parameter 'a' implicitly has an 'any' type.

239       .sort((a, b) => b.dy - a.dy);
                 ~

src/visualizations/sankey/initSankey.ts:239:17 - error TS7006: Parameter 'b' implicitly has an 'any' type.

239       .sort((a, b) => b.dy - a.dy);
                    ~

src/visualizations/sankey/initSankey.ts:242:31 - error TS7006: Parameter 'd' implicitly has an 'any' type.

242     link.append("title").text(d => `${d.source.name} → ${d.target.name}\n${format(d.value)}`);
                                  ~

src/visualizations/sankey/initSankey.ts:250:15 - error TS7006: Parameter 'n' implicitly has an 'any' type.

250       .filter(n => n.name !== "Exit")
                  ~

src/visualizations/sankey/initSankey.ts:258:17 - error TS7006: Parameter 'd' implicitly has an 'any' type.

258         .filter(d => {
                    ~

src/visualizations/sankey/initSankey.ts:266:17 - error TS7006: Parameter 'l' implicitly has an 'any' type.

266         .filter(l => !(includes(currentNode.sourceLinks, l) || includes(currentNode.targetLinks, l)))
                    ~

src/visualizations/sankey/initSankey.ts:285:7 - error TS2578: Unused '@ts-expect-error' directive.

285       // @ts-expect-error
          ~~~~~~~~~~~~~~~~~~~

src/visualizations/sunburst/initSunburst.ts:5:21 - error TS7016: Could not find a declaration file for module 'd3'. '/home/marius/redash/node_modules/d3/d3.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/d3` if it exists or add a new declaration (.d.ts) file containing `declare module 'd3';`

5 import * as d3 from "d3";
                      ~~~~

src/visualizations/sunburst/initSunburst.ts:9:1 - error TS2578: Unused '@ts-expect-error' directive.

9 // @ts-expect-error ts-migrate(2339) FIXME: Property 'scale' does not exist on type 'typeof im... Remove this comment to see the full error message
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/sunburst/initSunburst.ts:177:5 - error TS2578: Unused '@ts-expect-error' directive.

177     // @ts-expect-error ts-migrate(2339) FIXME: Property 'layout' does not exist on type 'typeof i... Remove this comment to see the full error message
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/sunburst/initSunburst.ts:185:7 - error TS2578: Unused '@ts-expect-error' directive.

185       // @ts-expect-error ts-migrate(2339) FIXME: Property 'arc' does not exist on type '(url: strin... Remove this comment to see the full error message
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/sunburst/initSunburst.ts:270:28 - error TS7006: Parameter 'd' implicitly has an 'any' type.

270       g.attr("transform", (d, i) => `translate(${i * (b.w + b.s)}, 0)`);
                               ~

src/visualizations/sunburst/initSunburst.ts:270:31 - error TS7006: Parameter 'i' implicitly has an 'any' type.

270       g.attr("transform", (d, i) => `translate(${i * (b.w + b.s)}, 0)`);
                                  ~

src/visualizations/sunburst/initSunburst.ts:305:17 - error TS7006: Parameter 'node' implicitly has an 'any' type.

305         .filter(node => ancestors.indexOf(node) >= 0)
                    ~~~~

src/visualizations/sunburst/initSunburst.ts:329:9 - error TS2578: Unused '@ts-expect-error' directive.

329         // @ts-expect-error ts-migrate(2554) FIXME: Expected 1 arguments, but got 2.
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/sunburst/initSunburst.ts:374:5 - error TS2578: Unused '@ts-expect-error' directive.

374     // @ts-expect-error ts-migrate(2531) FIXME: Object is possibly 'null'.
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/table/Editor/ColumnsSettings.test.tsx:2:20 - error TS7016: Could not find a declaration file for module 'enzyme'. '/home/marius/redash/node_modules/enzyme/build/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/enzyme` if it exists or add a new declaration (.d.ts) file containing `declare module 'enzyme';`

2 import enzyme from "enzyme";
                     ~~~~~~~~

src/visualizations/table/Editor/GridSettings.test.tsx:2:20 - error TS7016: Could not find a declaration file for module 'enzyme'. '/home/marius/redash/node_modules/enzyme/build/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/enzyme` if it exists or add a new declaration (.d.ts) file containing `declare module 'enzyme';`

2 import enzyme from "enzyme";
                     ~~~~~~~~

src/visualizations/table/columns/boolean.test.tsx:2:20 - error TS7016: Could not find a declaration file for module 'enzyme'. '/home/marius/redash/node_modules/enzyme/build/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/enzyme` if it exists or add a new declaration (.d.ts) file containing `declare module 'enzyme';`

2 import enzyme from "enzyme";
                     ~~~~~~~~

src/visualizations/table/columns/datetime.test.tsx:2:20 - error TS7016: Could not find a declaration file for module 'enzyme'. '/home/marius/redash/node_modules/enzyme/build/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/enzyme` if it exists or add a new declaration (.d.ts) file containing `declare module 'enzyme';`

2 import enzyme from "enzyme";
                     ~~~~~~~~

src/visualizations/table/columns/image.test.tsx:2:20 - error TS7016: Could not find a declaration file for module 'enzyme'. '/home/marius/redash/node_modules/enzyme/build/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/enzyme` if it exists or add a new declaration (.d.ts) file containing `declare module 'enzyme';`

2 import enzyme from "enzyme";
                     ~~~~~~~~

src/visualizations/table/columns/link.test.tsx:2:20 - error TS7016: Could not find a declaration file for module 'enzyme'. '/home/marius/redash/node_modules/enzyme/build/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/enzyme` if it exists or add a new declaration (.d.ts) file containing `declare module 'enzyme';`

2 import enzyme from "enzyme";
                     ~~~~~~~~

src/visualizations/table/columns/number.test.tsx:2:20 - error TS7016: Could not find a declaration file for module 'enzyme'. '/home/marius/redash/node_modules/enzyme/build/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/enzyme` if it exists or add a new declaration (.d.ts) file containing `declare module 'enzyme';`

2 import enzyme from "enzyme";
                     ~~~~~~~~

src/visualizations/table/columns/text.test.tsx:2:20 - error TS7016: Could not find a declaration file for module 'enzyme'. '/home/marius/redash/node_modules/enzyme/build/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/enzyme` if it exists or add a new declaration (.d.ts) file containing `declare module 'enzyme';`

2 import enzyme from "enzyme";
                     ~~~~~~~~

src/visualizations/word-cloud/Renderer.tsx:1:16 - error TS7016: Could not find a declaration file for module 'd3'. '/home/marius/redash/node_modules/d3/d3.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/d3` if it exists or add a new declaration (.d.ts) file containing `declare module 'd3';`

1 import d3 from "d3";
                 ~~~~

src/visualizations/word-cloud/Renderer.tsx:2:19 - error TS7016: Could not find a declaration file for module 'd3-cloud'. '/home/marius/redash/node_modules/d3-cloud/build/d3.layout.cloud.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/d3-cloud` if it exists or add a new declaration (.d.ts) file containing `declare module 'd3-cloud';`

2 import cloud from "d3-cloud";
                    ~~~~~~~~~~

src/visualizations/word-cloud/Renderer.tsx:71:3 - error TS2578: Unused '@ts-expect-error' directive.

71   // @ts-expect-error ts-migrate(2339) FIXME: Property 'scale' does not exist on type 'typeof im... Remove this comment to see the full error message
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/word-cloud/Renderer.tsx:76:3 - error TS2578: Unused '@ts-expect-error' directive.

76   // @ts-expect-error ts-migrate(2339) FIXME: Property 'scale' does not exist on type 'typeof im... Remove this comment to see the full error message
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/word-cloud/Renderer.tsx:107:5 - error TS2578: Unused '@ts-expect-error' directive.

107     // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/word-cloud/Renderer.tsx:116:17 - error TS7006: Parameter 'd' implicitly has an 'any' type.

116       .fontSize(d => d.size)
                    ~

src/visualizations/word-cloud/Renderer.tsx:152:3 - error TS2578: Unused '@ts-expect-error' directive.

152   // @ts-expect-error ts-migrate(2345) FIXME: Argument of type '() => () => layout.Cloud<cloud.W... Remove this comment to see the full error message
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/visualizations/word-cloud/Renderer.tsx:159:5 - error TS2578: Unused '@ts-expect-error' directive.

159     // @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 131 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @redash/viz@1.0.0 type-gen: `tsc --emitDeclarationOnly`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @redash/viz@1.0.0 type-gen script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/marius/.npm/_logs/2021-05-13T14_23_49_435Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @redash/viz@1.0.0 build:babel: `npm run type-gen && npm run build:babel:base`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @redash/viz@1.0.0 build:babel script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/marius/.npm/_logs/2021-05-13T14_23_49_449Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! redash-client@9.0.0-beta build:viz: `(cd viz-lib && npm run build:babel)`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the redash-client@9.0.0-beta build:viz script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/marius/.npm/_logs/2021-05-13T14_23_49_467Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! redash-client@9.0.0-beta build: `npm run clean && npm run build:viz && NODE_ENV=production webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the redash-client@9.0.0-beta build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

iI’v got the same issue, any solution?