Console 5.1 - react-router is missing useNavigate function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 460
- Forks
- 756
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 88
Description
The plugin fails at runtime with:
(0 , react_router__WEBPACK_IMPORTED_MODULE_1__.useNavigate) is not a function
Minimal code to reproduce the problem: https://github.com/rszwajko/console_router_bug
Initially encountered in the https://github.com/openshift/networking-console-plugin
Workarounds tried (no success):
- upgrading to 4.23.0-prerelease.5
- downgrading to 4.22.0
Steps:
- start plugin dev server:
npm run start - start the bridge
CONSOLE_IMAGE="quay.io/openshift/origin-console:5.1" npm run start-console
NOTE that the sample works if started withCONSOLE_IMAGE="quay.io/openshift/origin-console:5.0" - navigate to http://localhost:9000/router-bug
Expected result: an empty state page is displayed
Actual result: runtime error is shown
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproduction at https://github.com/rszwajko/console_router_bug and follow the listed npm run start and CONSOLE_IMAGE="quay.io/openshift/origin-console:5.1" npm run start-console steps. Compare behavior with the 5.0 image and investigate why useNavigate is unavailable; done means visiting /router-bug displays the empty state page without a runtime error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100