Warning: React.createElement: type is invalid when using ant-design Dropdown

Viewed 410

I have a problem when using a certain ant-design component: Dropdown.

The source code is written in ES6, and compiles fine using Babel. When loading the page, the following error is thrown, and the page is not rendered:

Warning: React.createElement: 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 `Dropdown`.
    in Dropdown (created by Dropdown)
    in Dropdown (created by DashboardTemplate)
    in div (created by Col)
    ...

I'm using the code as listed in this Gist which has perfectly worked, but since some packages are updated doesn't work. I cannot reproduce the working version with downgrading all packages, due to the fact that dependencies of dependencies still are updated to a newer version. I can also not reproduce the problem in a Codepen example.

Dropdown is a ant-design component and used as instructed in the ant-design documentation.

Any clue what can cause this error?

Webpack is used as bundler, and installed package versions are:

$ npm ls antd react react-router react-dom prop-types webpack
E:\dashboard
+-- antd@2.11.2
+-- laravel-elixir-webpack-official@1.0.10
| +-- webpack@2.1.0-beta.22
| `-- webpack-stream@3.2.0 (git://github.com/jeroennoten/webpack-stream.git#d78a3568e259f9cdbc64c60290639af6ef6d3baf)
|   `-- webpack@1.15.0
+-- prop-types@15.5.10
+-- react@15.6.1
+-- react-dom@15.6.1
+-- react-icons@2.2.5
| `-- react-icon-base@2.0.7
|   `-- prop-types@15.5.8
+-- react-router@3.0.5
`-- webpack@2.6.1

Thanks!

0 Answers
Related