ionic-framework
ionic-framework copied to clipboard
@ionic/react-router not compatible with latest version of ERROR in ./node_modules/@ionic/react-router/dist/index.js 890:18-28 export 'withRouter' (imported as 'withRouter') was not found in 'react-router-dom
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I agree to follow the Code of Conduct.
- [X] I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v7.x
Current Behavior
When upgrading getting the following error message: ERROR in ./node_modules/@ionic/react-router/dist/index.js 890:18-28 export 'withRouter' (imported as 'withRouter') was not found in 'react-router-dom' (possible exports: AbortedDeferredError, Await, BrowserRouter, Form, HashRouter, Link, MemoryRouter, NavLink, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, ScrollRestoration, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_ErrorResponseImpl, UNSAFE_FetchersContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_ViewTransitionContext, UNSAFE_useRouteId, UNSAFE_useScrollRestoration, createBrowserRouter, createHashRouter, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, createSearchParams, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, resolvePath, unstable_HistoryRouter, unstable_usePrompt, unstable_useViewTransitionState, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useBlocker, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit)
Expected Behavior
Work with no probs
Steps to Reproduce
Upgrade to react 18
Code Reproduction URL
https://github.com/superm123/fjm
Ionic Info
Using latest ionic props package.json
Additional Information
No response
Can you make your repo public?
Maybe just give me a username or two and i will give you access
On Mon, 29 Apr 2024, 16:35 Liam DeBeasi, @.***> wrote:
Can you make your repo public?
— Reply to this email directly, view it on GitHub https://github.com/ionic-team/ionic-framework/issues/29415#issuecomment-2082916403, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEIMHF2BBJDH7MNWZCLFSTY7ZLB3AVCNFSM6AAAAABG6FZJCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBSHEYTMNBQGM . You are receiving this because you authored the thread.Message ID: @.***>
Can you make the repo public so the entire team has access? The reproduction case should contain only the code required to reproduce the issue, and any secret code should be removed.
I'm facing the same issue, any news?
I personally think its just just the latest react router is not compatible with react dom router 6
Just not got around to make a working example for them
Op Di. 14 Mei 2024 om 12:58 het Emi @.***> geskryf:
I'm facing the same issue, any news?
— Reply to this email directly, view it on GitHub https://github.com/ionic-team/ionic-framework/issues/29415#issuecomment-2109902640, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEIMHBHTLWIL7MMCGYE26TZCHU6VAVCNFSM6AAAAABG6FZJCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBZHEYDENRUGA . You are receiving this because you authored the thread.Message ID: @.***>
Hello, @ionic/react-router is not compatible with React Router 6. There is an open issue for this if you'd like to subscribe to it for updates: https://github.com/ionic-team/ionic-framework/issues/24177
If you are running into issues using @ionic/react-router with React Router 5, please open a new issue with a minimal reproduction that we can use to reproduce the issue. Thank you!
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.