Rechartsのパッケージをいれましたが、ビルドでエラーが出てしまいます。
解決方法を教えてください。
エラー
Area.d.ts, Bar.d.ts, Line.d.tsなどで
typescriptのエラーTS2344が発生します。
ERROR in xxxx/node_modules/recharts/types/polar/Pie.d.ts ERROR in xxxx/node_modules/recharts/types/polar/Pie.d.ts(100,23): TS2344: Type '"string" | "end" | "local" | "color" | "clip" | "style" | "hide" | "fill" | "stroke" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "additive" | "data" | ... 477 more ... | "crossOrigin"' does not satisfy the constraint '"string" | "end" | "local" | "color" | "clip" | "style" | "hide" | "fill" | "stroke" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "additive" | "data" | ... 476 more ... | "cornerRadius"'. Type '"path"' is not assignable to type '"string" | "end" | "local" | "color" | "clip" | "style" | "hide" | "fill" | "stroke" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "additive" | "data" | ... 476 more ... | "cornerRadius"'.
パッケージのバージョン
$ npm list --depth=0
+-- @types/express@4.17.2
+-- @types/fs-extra@8.0.1
+-- @types/lodash.throttle@4.1.6
+-- @types/react@16.9.11
+-- @types/react-dom@16.9.4
+-- @types/react-leaflet@2.5.0
+-- @types/react-toggle@4.0.2
+-- @types/recharts@1.8.19
+-- @types/socket.io@2.1.4
+-- @types/socket.io-client@1.4.32
+-- case-sensitive-paths-webpack-plugin@2.2.0
+-- elasticsearch@15.5.0
+-- elasticsearch-streams@0.0.10
+-- emoji-favicon@0.3.0
+-- express@4.17.1
+-- forever@1.0.0
+-- fork-ts-checker-webpack-plugin@1.6.0
+-- fs-extra@8.1.0
+-- husky@1.3.1
+-- kafka-node@4.1.3
+-- leaflet@1.6.0
+-- lint-staged@8.2.1
+-- lodash.throttle@4.1.1
+-- prettier@1.19.1
+-- raw-loader@2.0.0
+-- rc-slider@8.7.1
+-- UNMET PEER DEPENDENCY react@16.12.0
+-- react-dom@16.12.0
+-- react-leaflet@2.6.0
+-- react-leaflet-heatmap-layer@2.0.0
+-- react-throttle-render@2.0.0
+-- react-toggle@4.1.1
+-- recharts@2.0.3
+-- socket.io@2.3.0
+-- ts-loader@5.4.5
+-- typescript@3.7.2
+-- webpack@4.41.2
+-- webpack-bundle-analyzer@3.6.0
+-- webpack-cli@3.3.10
`-- webpack-node-externals@1.7.2
npm ERR! peer dep missing: react@^0.14.0 || ^15.0, required by react-throttle-render@2.0.0
よろしくお願いします。
あなたの回答
tips
プレビュー