data-ui
data-ui copied to clipboard
WARNING export 'withTooltipPropTypes' (imported as 'vxTooltipPropTypes') was not found
I have the following dependency in package.json
"@data-ui/xy-chart": "^0.0.84",
"@vx/tooltip": "^0.0.192"
When running yarn start (compiling the project), webpack gives warning
WARNING in ./node_modules/@data-ui/shared/esm/enhancer/WithTooltip.js 3:60-78
export 'withTooltipPropTypes' (imported as 'vxTooltipPropTypes') was not found in '@vx/tooltip/build/tooltips/TooltipWithBounds' (possible exports: __esModule, default)
@ ./node_modules/@data-ui/shared/esm/index.js 1:71-151 1:71-151 1:71-151
@ ./node_modules/@data-ui/xy-chart/esm/chart/XYChart.js 11:0-46 301:33-44
@ ./node_modules/@data-ui/xy-chart/esm/index.js 2:0-84 2:0-84 2:0-84
...
And This line of import seems indeed to be invalid: https://github.com/williaster/data-ui/blob/169dd6da1a68299f12d6792e2616e32356ba9395/packages/shared/src/enhancer/WithTooltip.jsx#L7
considering that withTooltipPropTypes really is not found in tooltip package: https://github.com/airbnb/visx/blob/master/packages/visx-tooltip/src/tooltips/TooltipWithBounds.tsx
Also experiencing this issue with @data-ui/histogram. I tried rolling back to @vx/tooltip 0.0.165 to match the dependency of data-ui/histogram, but it had no impact.
Altering https://github.com/williaster/data-ui/blob/169dd6da1a68299f12d6792e2616e32356ba9395/packages/shared/src/enhancer/WithTooltip.jsx#L8
To read;
from "@vx/tooltip/build/enhancers/TooltipWithBounds"
Resolved the issue as withTooltopPropTypes exists here.
@schwannden @phenry2 Have you found a fix or workaround here? I'm upgrading to webpack 5 and now I'm starting to run into this as well.
Sorry, I gave up and switched to a completely different package in the end. Everything I tried seemed to make it worse.
I was able to hack around this problem following the suggestion here: https://github.com/williaster/data-ui/issues/208#issuecomment-873039538
The imports should look like this:
import TooltipWithBounds from '@vx/tooltip/build/tooltips/TooltipWithBounds';
import { withTooltipPropTypes as vxTooltipPropTypes } from '@vx/tooltip/build/enhancers/withTooltip';
I pushed a custom fork (with only the above fix) to our internal registry and that was enough to get past my most immediate obstacle. Agreed that the appropriate long-term strategy is to ditch data-ui entirely.
Sorry, I gave up and switched to a completely different package in the end. Everything I tried seemed to make it worse.
Hey, what package did you switch to?
Start using carbon charts, they have a nice histogram. https://github.com/carbon-design-system/carbon-charts
Sorry, I gave up and switched to a completely different package in the end. Everything I tried seemed to make it worse.
Hey, what package did you switch to?
Start using carbon charts, they have a nice histogram. https://github.com/carbon-design-system/carbon-charts
Start using carbon charts, they have a nice histogram. https://github.com/carbon-design-system/carbon-charts
Sorry, I gave up and switched to a completely different package in the end. Everything I tried seemed to make it worse.
Hey, what package did you switch to?
Start using carbon charts, they have a nice histogram. https://github.com/carbon-design-system/carbon-charts
It's not a solution to this issue 😅