Skip to content

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

Open

Description

@schwannden

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:

withTooltipPropTypes as vxTooltipPropTypes,

considering that withTooltipPropTypes really is not found in tooltip package: https://github.com/airbnb/visx/blob/master/packages/visx-tooltip/src/tooltips/TooltipWithBounds.tsx

Activity

  1. phenry2 commented on Jul 2, 2021

    @phenry2

    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.

  2. phenry2 commented on Jul 2, 2021

    @phenry2

    Altering

    } from '@vx/tooltip/build/tooltips/TooltipWithBounds';

    To read;

    from "@vx/tooltip/build/enhancers/TooltipWithBounds"

    Resolved the issue as withTooltopPropTypes exists here.

  3. kaiyoma commented on Oct 19, 2021

    @kaiyoma

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

  4. phenry2 commented on Oct 19, 2021

    @phenry2

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

  5. kaiyoma commented on Oct 19, 2021

    @kaiyoma

    I was able to hack around this problem following the suggestion here: #208 (comment)

    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.

  6. ninjaasmoke commented on Feb 8, 2022

    @ninjaasmoke

    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?

  7. phenry2 commented on Feb 8, 2022

    @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

  8. coolbirdzik commented on Jul 13, 2022

    @coolbirdzik

    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 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions