Sometimes, when using React libraries, such as react-router, I get this error:
Uncaught TypeError: Cannot read property \'firstChild\' of undefined
This error is commonly caused by two versions of React loaded alongside.
For example, if you npm install a package that requires a different React version and puts it into dependencies instead of peerDependencies, it might install a separate React into node_modules/.
Two different Reacts won't play nicely together (at least yet).
To fix it, just delete node_modules/.
If you see a library putting React in dependencies instead of peerDependencies, file an issue.