data-ui icon indicating copy to clipboard operation
data-ui copied to clipboard

WARNING export 'withTooltipPropTypes' (imported as 'vxTooltipPropTypes') was not found

Open schwannden opened this issue 3 years ago • 8 comments

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

schwannden avatar May 17 '21 06:05 schwannden

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.

phenry2 avatar Jul 02 '21 14:07 phenry2

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.

phenry2 avatar Jul 02 '21 14:07 phenry2

@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.

kaiyoma avatar Oct 19 '21 06:10 kaiyoma

Sorry, I gave up and switched to a completely different package in the end. Everything I tried seemed to make it worse.

phenry2 avatar Oct 19 '21 07:10 phenry2

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.

kaiyoma avatar Oct 19 '21 17:10 kaiyoma

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?

ninjaasmoke avatar Feb 08 '22 18:02 ninjaasmoke

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

phenry2 avatar Feb 08 '22 23:02 phenry2

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 😅

nth-zik avatar Jul 13 '22 08:07 nth-zik