Skip to content

[BUG] Unable to use tooltip from within a package #1067

Closed
@TimBAtGov

Description

@TimBAtGov

Bug description
When referencing the tooltip inside of a package an error is displayed that says:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `RequestType`.
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `OperatingRequest`.
    at createFiberFromTypeAndProps (http://localhost:3000/static/js/bundle.js:111968:25)
    at createFiberFromElement (http://localhost:3000/static/js/bundle.js:111991:19)
    at createChild (http://localhost:3000/static/js/bundle.js:102081:32)
    at reconcileChildrenArray (http://localhost:3000/static/js/bundle.js:102302:29)
    at reconcileChildFibers (http://localhost:3000/static/js/bundle.js:102634:18)
    at reconcileChildren (http://localhost:3000/static/js/bundle.js:105142:32)
    at updateHostComponent (http://localhost:3000/static/js/bundle.js:105690:7)
    at beginWork (http://localhost:3000/static/js/bundle.js:106920:18)
    at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:93934:18)
    at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:93978:20)

It works as intended when I run the app (before being packaged) locally. If I remove the tooltip from the page then page loads as intended when navigating to that page within another app using the packaged version.

Version of Package
Latest and 5.12.0

To Reproduce
Create an app that has a tooltip and then bundle it as a package with react-tooltip as a dependency.
Create a new app and install the package and reference the package app with the tooltip.
Run the new app and navigate to the page from the package.

Expected behavior
Would expect to be able to load the page and hover over the element with the tooltip

Desktop (please complete the following information if possible or delete this section):

  • OS: Windows 10
  • Browser: Chrome
  • Version: Version 114.0.5735.199
  • Frameworks: React 17.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugHelp WantedStaleThis has not seen activity in quite some time

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions