ionic-framework icon indicating copy to clipboard operation
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

Open superm123 opened this issue 1 year ago • 3 comments

Prerequisites

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

superm123 avatar Apr 29 '24 12:04 superm123

Can you make your repo public?

liamdebeasi avatar Apr 29 '24 14:04 liamdebeasi

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: @.***>

superm123 avatar Apr 29 '24 19:04 superm123

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.

liamdebeasi avatar Apr 30 '24 13:04 liamdebeasi

I'm facing the same issue, any news?

emitategh avatar May 14 '24 10:05 emitategh

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: @.***>

superm123 avatar May 14 '24 11:05 superm123

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!

brandyscarney avatar May 14 '24 20:05 brandyscarney

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.

ionitron-bot[bot] avatar Jun 13 '24 20:06 ionitron-bot[bot]