creativetimofficial / ct-light-bootstrap-dashboard-pro-react

LBD Pro React Version
20 stars 8 forks source link

You should not use <Link> outside a <Router> #35

Closed smwade closed 5 years ago

smwade commented 5 years ago

Expected Behavior

Being able to build and see the client

Current Behavior

What is the current behavior?

I download directly from Creative Tim and then ran npm install and npm start. However the browser gives the error: "You should not use outside a "

Failure Information (for bugs)

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

1.Download 2.npm install 3.npm start

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Ubuntu 18.04 and Mac Mojave npm version: 6.9 and 6.7

Failure Logs

react-dom.development.js:10994 Uncaught Invariant Violation: You should not use outside a at invariant (http://localhost:3000/static/js/bundle.js:32908:15) at Link.render (http://localhost:3000/static/js/bundle.js:114466:54) at finishClassComponent (http://localhost:3000/static/js/bundle.js:91425:31) at updateClassComponent (http://localhost:3000/static/js/bundle.js:91402:12) at beginWork (http://localhost:3000/static/js/bundle.js:91777:16) at performUnitOfWork (http://localhost:3000/static/js/bundle.js:93776:16) at workLoop (http://localhost:3000/static/js/bundle.js:93840:26) at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:84094:14) at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:84133:16) at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:83990:27) at renderRoot (http://localhost:3000/static/js/bundle.js:93918:7) at performWorkOnRoot (http://localhost:3000/static/js/bundle.js:94566:24) at performWork (http://localhost:3000/static/js/bundle.js:94519:7) at requestWork (http://localhost:3000/static/js/bundle.js:94430:7) at scheduleWorkImpl (http://localhost:3000/static/js/bundle.js:94284:11) at scheduleWork (http://localhost:3000/static/js/bundle.js:94241:12) at scheduleTopLevelUpdate (http://localhost:3000/static/js/bundle.js:94745:5) at Object.updateContainer (http://localhost:3000/static/js/bundle.js:94783:7) at http://localhost:3000/static/js/bundle.js:98778:19 at Object.unbatchedUpdates (http://localhost:3000/static/js/bundle.js:94654:12) at renderSubtreeIntoContainer (http://localhost:3000/static/js/bundle.js:98777:17) at Object.render (http://localhost:3000/static/js/bundle.js:98842:12) at Object../src/index.js (http://localhost:3000/static/js/bundle.js:148791:51) at webpack_require (http://localhost:3000/static/js/bundle.js:679:30) at fn (http://localhost:3000/static/js/bundle.js:89:20) at Object.0 (http://localhost:3000/static/js/bundle.js:167491:18) at webpack_require (http://localhost:3000/static/js/bundle.js:679:30) at http://localhost:3000/static/js/bundle.js:725:37

einazare commented 5 years ago

Hello there @smwade ,

Thank you for your interest in working with our products. Sorry for the late response, we do not work on weekends. In our package.json file we only install "react-router-dom". This package auto-installs "react-router". The problem is that is installing the latest version of "react-router", instead of the same version as "react-router-dom", and that is why you are having this error. Run the following command:

npm i -E react-router@4.2.2

And this will do the trick.

Best, Manu