Reputation: 11
ERROR in ./node_modules/react-router-dom/dist/index.js 13:0-836 export 'AbortedDeferredError' (reexported as 'AbortedDeferredError') was not found in 'react-router' (possible exports: Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_DataStaticRouterContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_enhanceManualRouteObjects, createMemoryRouter, createRoutesFromChildren, createRoutesFromElements, renderMatches, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes)
Upvotes: 0
Views: 12683
Reputation: 26
Restart your react development server:
This has fixed the issue for me.
Upvotes: 0
Reputation: 1
make sure you are installing react-dom, react-router, and react-router-dom
in the right directory
Upvotes: 0
Reputation: 149
If you installed this while your React app was running, stop it and restart. This fixed the same problem for me. Apparently it's supposed to detect new installs, but it didn't for me.
Upvotes: 4
Reputation: 105
Do this.
Import {BrowserRouter as Router, Routes, Route} from "react-router-dom";
Import React from 'react';
Also make sure that you have installed the following packages;
react-dom, react-router, react-router-dom.
Upvotes: 1