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

前端 未结 30 1108
孤城傲影
孤城傲影 2020-11-22 06:53

I am getting this error:

Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/funct

30条回答
  •  情话喂你
    2020-11-22 07:27

    Another possible solution, that worked for me:

    Currently, react-router-redux is in beta and npm returns 4.x, but not 5.x. But the @types/react-router-redux returned 5.x. So there were undefined variables used.

    Forcing NPM/Yarn to use 5.x solved it for me.

提交回复
热议问题