Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript React Router Basics Getting Started with React Router Installing React Router and Declaring a Route

Can't get code to work although code perfectly matches.

Keep getting these errors

1.) Warning: Failed prop type: The prop history is marked as required in Router, but its value is undefined. in Router

2.) Uncaught TypeError: Cannot read property 'location' of undefined at new Router (bundle.js:29871) at bundle.js:22920 at measureLifeCyclePerf (bundle.js:22700) at ReactCompositeComponentWrapper._constructComponentWithoutOwner (bundle.js:22919) at ReactCompositeComponentWrapper._constructComponent (bundle.js:22905) at ReactCompositeComponentWrapper.mountComponent (bundle.js:22813) at Object.mountComponent (bundle.js:15421) at ReactCompositeComponentWrapper.performInitialMount (bundle.js:22996) at ReactCompositeComponentWrapper.mountComponent (bundle.js:22883) at Object.mountComponent (bundle.js:15421)

Not sure what to do when my code matches up perfectly... Have re-written several times

I have figured this out.. When I installed react-router it gave me version 4.0.0 and this was not responding.. So i re-installed react-router at version 3.0.2 (npm install --save react-router@3.0.2) and this seemed to have fixed the problem.. Not sure if this is just a bug in the last react-router update or what.. But if anyone else comes across this problem just use an older version of react-router..