React type.toUpperCase is not a function

If you get this error

type.toUpperCase is not a function

then you probrably forgot to use

module.exports = MyNewComponent

It can not be easy to spot, because the error does not show where it actually is, you see something like this

Image for post
Image for post

So before you pull your hair out (as I have done), go back and look at the latest component you made, and check if you export the module correct.

Image for post
Image for post

Written by

I really like building stuff with React.js and Docker and also Meetups ❤

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store