You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing the Scorecards plugin (v0.9.0), the backstage frontend is no longer accessible. Instead a React error shows. Even removing the routes etc. from App.tsx/Root.tsx/EntityPage.tsx, the error still shows.
Expected Behavior
Installing the plugin should not break the frontend.
Current Behavior
Installing the plugin breaks the frontend.
Error useLocation() may be used only in the context of a <Router> component.
Call Stack
invariant
node_modules/@remix-run/router/dist/router.js:292:11
useLocation
node_modules/@backstage/core-plugin-api/node_modules/react-router/dist/index.js:380:95
useRouteRef
node_modules/@backstage/core-plugin-api/dist/index.esm.js:380:85
Settings
node_modules/@backstage/plugin-user-settings/dist/components/Settings.esm.js:18:92
renderWithHooks
node_modules/react-dom/cjs/react-dom.development.js:15486:27
mountIndeterminateComponent
node_modules/react-dom/cjs/react-dom.development.js:20098:13
beginWork
node_modules/react-dom/cjs/react-dom.development.js:21621:16
callCallback
node_modules/react-dom/cjs/react-dom.development.js:4164:14
invokeGuardedCallbackDev
node_modules/react-dom/cjs/react-dom.development.js:4213:16
invokeGuardedCallback
node_modules/react-dom/cjs/react-dom.development.js:4277:31
StackOverflow pointed to react-router and react-router-dom as being potential causes of the issue. A diff of yarn.lock shows that installing this plugin has added react-router@6.4.5 and react-router-dom@6.4.5.
#278 has been opened to update to 6.23.1 for both these packages. That version already exists in my yarn.lock so I assume this will resolve the issue.
Running yarn remove --cwd packages/app @oriflame/backstage-plugin-score-card resolved the issue.
Same here, although instead of useLocation() we get the same error for useHref(). Recreating yarn.lock seems to resolve it temporarily but the issue pops up every now and then.
After installing the Scorecards plugin (v0.9.0), the backstage frontend is no longer accessible. Instead a React error shows. Even removing the routes etc. from App.tsx/Root.tsx/EntityPage.tsx, the error still shows.
Expected Behavior
Installing the plugin should not break the frontend.
Current Behavior
Installing the plugin breaks the frontend.
Steps to Reproduce
yarn add --cwd packages/app @oriflame/backstage-plugin-score-card
Possible Solution
StackOverflow pointed to
react-router
andreact-router-dom
as being potential causes of the issue. A diff of yarn.lock shows that installing this plugin has addedreact-router@6.4.5
andreact-router-dom@6.4.5
.#278 has been opened to update to 6.23.1 for both these packages. That version already exists in my yarn.lock so I assume this will resolve the issue.
Running
yarn remove --cwd packages/app @oriflame/backstage-plugin-score-card
resolved the issue.Context
Your Environment
Output of
yarn backstage-cli info
:The text was updated successfully, but these errors were encountered: