etn-ccis / blui-icons

Brightlayer UI icons for Eaton applications. Includes design files, icon font, and svg icons
BSD 3-Clause "New" or "Revised" License
9 stars 7 forks source link

Unable to run React demo #308

Closed huayunh closed 9 months ago

huayunh commented 9 months ago

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

surajeaton commented 9 months ago

This is probably because there are different versions of react-router and react-router-dom

joebochill commented 9 months ago

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.

huayunh commented 9 months ago

@joebochill Doing that will replace the old error message with new error messages on my side in my branch: image

joebochill commented 9 months ago

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