Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popover: Element type is invalid: expected a string but got Object #2687

Closed
cmac458 opened this issue Jul 13, 2018 · 6 comments
Closed

Popover: Element type is invalid: expected a string but got Object #2687

cmac458 opened this issue Jul 13, 2018 · 6 comments

Comments

@cmac458
Copy link

cmac458 commented Jul 13, 2018

Environment

  • Package version(s):
    "@blueprintjs/core": "^3.0.0",
    "react-transition-group": "^2.4.0",
    "react": "^16.4.1",

  • Browser and OS versions:
    Windows 7
    Chrome Version 67.0.3396.99

Steps to reproduce

    let addMenu = (
      <Menu>
        <MenuItem icon="graph" text="Date Histogram"/>
        <MenuItem icon="chart" text="Bar Chart"/>
      </Menu>
    )

return (
        <Popover content={addMenu} minimal={true} position={Position.BOTTOM_LEFT} >
            <Button className={classes.right} icon="new-grid-item" />
          </Popover>
)

Actual behavior

The following Error appears in console, and the page doesn't load

Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of Manager

Expected behavior

Page loads and the popover is rendered.

Possible solution

n/a

@giladgray
Copy link
Contributor

@cmac458 which version of blueprint are you using? have you installed react-transition-group?
please fill out the template as requested.

@cmac458
Copy link
Author

cmac458 commented Jul 13, 2018

@giladgray apologies, the issue has been updated with the appropriate detail

@giladgray
Copy link
Contributor

@cmac458 thanks for updating. hmm this error suggests that something is returned an invalid JSX element. i've primarily seen this error when missing react-transition-group (#2511).
do you also have react-popper@1.0.0?

@cmac458
Copy link
Author

cmac458 commented Jul 13, 2018

@giladgray I didn't have react-popper@1.0.0. I have tried adding to the project along with popper.js, but I still face the same issue.

@giladgray
Copy link
Contributor

@cmac458 hmm i don't know what to say. try blowing away your node_modules and reinstalling fresh? tends to fix missing packages.

@giladgray
Copy link
Contributor

🤷‍♂️

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

No branches or pull requests

2 participants