Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Uncaught Invariant Violation: 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 VelocityTransitionGroup. #250

Open
htoor91 opened this issue Apr 29, 2020 · 2 comments

Comments

@htoor91
Copy link

htoor91 commented Apr 29, 2020

Using the latest version of treebeard (4.2.4) and having this issue with VelocityTransitionGroup. Several people have mentioned that animations={false} as a prop to Treebeard should help fix it, but it doesn't. I've tried downgrading, but no success.

To note, it works perfectly fine on storybook, but when we use it in app, it breaks. We're trying to render the component on an animated sidebar, and that's the only difference between the storybook version and our in app version...all the data is the same and static for testing purposes. It just breaks and shows that error in console when the component is mounted onto our sidebar.

@IvanRoslov
Copy link

I have same problem.

@MatthewCochrane
Copy link

I had the same issue and have resolved it now. My problem was that I had something akin to this in my webpack.config.js.

module.exports = {
  //...
  resolve: {
    modules: [path.resolve(__dirname, 'node_modules'),],
  },
};

Note that the search path from which to resolve modules is an absolute path, not a relative one. This meant that when resolving modules, webpack would only use root-level modules.

And so, velocity-react was importing the wrong version of TransistionGroup from react-transition-group because it was looking for the module at the absolute path instead of relative to that module.

See also:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants