Closed OliverCole closed 5 years ago
I have tried the same. I get the same result on:
Mac Windows 10 Ubuntu 18.10 Ubuntu 18.04
Ya, the strange thing is that it built with no errors a week ago. I have tried with several versions of npm with no luck. I also tried with the other react templates on creativetim and those also have this error. The only way I have been able to remove it is commenting out every <NavLink>
component under the <Sidebar>
Did you do an upgrade since? Would be super helpful to work out which package changed - as I think that’s probably the cause.
Ya that’s what I figured too, but It didn’t.... The package.json has no diffs on my repo. Also I am running in a docker container so I know that is consistent.
Is there any logs or things I can send you to get a better idea?
On Sun, Mar 17, 2019 at 11:59 PM OliverCole notifications@github.com wrote:
Did you do an upgrade since? Would be super helpful to work out which package changed - as I think that’s probably the cause.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/creativetimofficial/light-bootstrap-dashboard-react/issues/47#issuecomment-473780210, or mute the thread https://github.com/notifications/unsubscribe-auth/ALdqNlHKo1yuJR3ITBbMPDYYTkuIKhFLks5vXystgaJpZM4b4XF5 .
Hello there, guys,
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
Great thanks Manu! Thought I was going crazy. Just one thing, version 4.2.2 isn't on npmjs but 4.2.0 is and works great.
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Main page renders.
Current Behavior
Render error:
You should not use <Link> outside a <Router>
Seems similar to https://github.com/creativetimofficial/material-kit-react/issues/25.
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
npm install
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.
npm list
: https://gist.github.com/OliverCole/fac0e9d8c5f56f73d5ef2a4d8dd5c559Failure Logs
See above.