etn-ccis/blui-icons

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?

  1. Git clone
  2. from project root, run: yarn install && yarn build && yarn start

Screenshots / Screen recording

image

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:
image

react-dom and react-router-dom need to be in sync.
image

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:
image

That's a separate issue due to the changes in your branch. Updating/syncing the versions gets the demo to run on dev branch.