Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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..