StephenGrider / ReduxSimpleStarter

Starter pack for an awesome Udemy course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React-router error

adharbert opened this issue · comments

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!

commented

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.

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.

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.

commented

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

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

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