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

Error: Minified React error #130 #1656

Closed
jimfilippou opened this issue Jul 29, 2017 · 3 comments
Closed

Error: Minified React error #130 #1656

jimfilippou opened this issue Jul 29, 2017 · 3 comments

Comments

@jimfilippou
Copy link

Details: 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 t

It's just an error but on development server it works!. On gatsby develop everything works perfectly but when i do gatsby build and drop files on github pages it raises this minified error. What is going on?

@alexbassy
Copy link
Contributor

alexbassy commented Jul 31, 2017

I'm also getting this error, and it's very difficult to debug :(

EDIT: @jimfilippou I fixed it by setting the type of children in src/layouts/index.js to any like this:

TemplateWrapper.propTypes = {
  children: PropTypes.any,
}

I added babel-plugin-transform-react-remove-prop-types which I thought removed prop types all together, so I thought this would eliminate prop validation errors, but I guess I don't understand that plugin properly.

@jimfilippou
Copy link
Author

Good call , in my case it was a npm package. When i rebuild my app it was working properly but i will follow your proptypes it seems better than mine

@pczern
Copy link

pczern commented Mar 23, 2018

I recommend PropTypes.node, it's more specific than any and works too.

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

No branches or pull requests

4 participants