StephenGrider / ReduxSimpleStarter

Starter pack for an awesome Udemy course
MIT License
3.56k stars 4.63k forks source link

React-router error #234

Open adharbert opened 6 years ago

adharbert commented 6 years ago

I'm not sure what the error is, but when I installed react-router it isn't working. I get the same error over and over on the new site, if I remove imports for react-router I am able to see the page, but once I log back in, I get the following error:

bundle.js:86 Uncaught ReferenceError: Provider is not defined at Object. (bundle.js:86) at webpack_require (bundle.js:20) at Object. (bundle.js:47) at webpack_require (bundle.js:20) at bundle.js:40 at bundle.js:43

Any ideas why this would be an issue?

Thanks!

maximsan commented 6 years ago

I've encountered another error with react-router "Uncaught TypeError: Cannot read property 'func' of undefined". It was fixed by updating to react-router@3.2.0 as for me. I'm not sure, but maybe it will fix your problem too.

adharbert commented 6 years ago

Thanks for the response, I tried that last night as well but still have the error. I might blow the project away and start from scratch, it might be a bad download or something.

nagarajach commented 6 years ago

Please type this command in your command prompt npm dist-tag ls react-router.

Will find this below output: $ npm dist-tag ls react-router latest: 4.1.1 next: 4.0.0 previous: 3.0.5 $ npm dist-tag ls react-router-dom latest: 4.1.1 next: 4.0.0-beta.8 . So based on this we could install latest version like npm install --save react-router@4.1.1.

Might be with this update your issue will get resolved.

monastyrskiiden commented 6 years ago

Have the same issue as adharbert. Fixed by updating to react-router@3.2.0 as maximsan said.

David2913 commented 6 years ago

Also, you could consider installing react-router-dom instead of react-router, it seems to be the way to go regarding routing. I used only that dependency and did not encounter any problems

shrimpdoom1920 commented 6 years ago

Thanks @maximsan for sharing this. I thought that I would never finish this course because of this stupid bug.