Unable to run React demo
Closed this issue · 4 comments
Describe the bug / expected behavior
The screen is blank. The console displays the error message Uncaught Error: useNavigate() may be used only in the context of a <Router> component.
This happens on dev branch
What are the steps to reproduce?
- Git clone
- from project root, run:
yarn install && yarn build && yarn start
Screenshots / Screen recording
Your environment information
- node v20.11.0
- yarn v3.3.0
- macOS 14.2.1 (23C71)
- chrome 121.0.6167.184
This is probably because there are different versions of react-router and react-router-dom
Yeah, there are multiple version of react-router installed:
react-dom and react-router-dom need to be in sync.
This stems from this dependabot PR:
https://github.com/etn-ccis/blui-icons/pull/294/files
Updating both to ^6.22.0
(latest) in the demo resolves the issue.
@joebochill Doing that will replace the old error message with new error messages on my side in my branch:
That's a separate issue due to the changes in your branch. Updating/syncing the versions gets the demo to run on dev branch.