I've migrated an app to React 18 / Router v6 and vite build results in these errors:
node_modules/@types/react-router-dom/index.d.ts:13:10 - error TS2305: Module '"react-router"' has no exported member 'match'.
13 import { match } from 'react-router';
~~~~~
node_modules/@types/react-router-dom/index.d.ts:19:5 - error TS2305: Module '"react-router"' has no exported member 'PromptProps'.
19 PromptProps,
~~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:20:5 - error TS2305: Module '"react-router"' has no exported member 'Prompt'.
20 Prompt,
~~~~~~
node_modules/@types/react-router-dom/index.d.ts:23:5 - error TS2305: Module '"react-router"' has no exported member 'RedirectProps'.
23 RedirectProps,
~~~~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:24:5 - error TS2724: '"react-router"' has no exported member named 'Redirect'. Did you mean 'redirect'?
24 Redirect,
~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:25:5 - error TS2305: Module '"react-router"' has no exported member 'RouteChildrenProps'.
25 RouteChildrenProps,
~~~~~~~~~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:26:5 - error TS2305: Module '"react-router"' has no exported member 'RouteComponentProps'.
26 RouteComponentProps,
~~~~~~~~~~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:31:5 - error TS2305: Module '"react-router"' has no exported member 'StaticRouterProps'.
31 StaticRouterProps,
~~~~~~~~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:32:5 - error TS2305: Module '"react-router"' has no exported member 'StaticRouter'.
32 StaticRouter,
~~~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:33:5 - error TS2305: Module '"react-router"' has no exported member 'SwitchProps'.
33 SwitchProps,
~~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:34:5 - error TS2305: Module '"react-router"' has no exported member 'Switch'.
34 Switch,
~~~~~~
node_modules/@types/react-router-dom/index.d.ts:35:5 - error TS2305: Module '"react-router"' has no exported member 'match'.
35 match,
~~~~~
node_modules/@types/react-router-dom/index.d.ts:37:5 - error TS2305: Module '"react-router"' has no exported member 'withRouter'.
37 withRouter,
~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:38:5 - error TS2305: Module '"react-router"' has no exported member 'RouterChildContext'.
38 RouterChildContext,
~~~~~~~~~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:39:5 - error TS2305: Module '"react-router"' has no exported member 'useHistory'.
39 useHistory,
~~~~~~~~~~
node_modules/@types/react-router-dom/index.d.ts:42:5 - error TS2724: '"react-router"' has no exported member named 'useRouteMatch'. Did you mean 'RouteMatch'?
42 useRouteMatch,
~~~~~~~~~~~~~
node_modules/@types/react-router-hash-link/index.d.ts:19:18 - error TS2320: Interface 'NavHashLinkProps' cannot simultaneously extend types 'NavLinkProps' and 'Omit<HashLinkProps, "style" | "className">'.
Named property 'children' of types 'NavLinkProps' and 'Omit<HashLinkProps, "style" | "className">' are not identical.
19 export interface NavHashLinkProps extends NavLinkProps, Omit<HashLinkProps, 'className' | 'style'> { }
This seems to be caused by this dependency in yarn.lock:
I've migrated an app to React 18 / Router v6 and
vite build
results in these errors:This seems to be caused by this dependency in
yarn.lock
:Is there something I can do about it?