Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the default template is broken #42

Open
akoskm opened this issue Dec 20, 2024 · 0 comments
Open

the default template is broken #42

akoskm opened this issue Dec 20, 2024 · 0 comments

Comments

@akoskm
Copy link

akoskm commented Dec 20, 2024

Hi!

After following the instructions here: https://reactrouter.com/start/framework/installation

and running npm run dev, I get:

/my-react-router-app$ npm run dev

> dev
> react-router dev

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "UNSAFE_useRoutesImpl"

    ../node_modules/react-router-dom/dist/index.js:13:101:
      13 │ ...ataRouterContext, UNSAFE_DataRouterStateContext, Router, UNSAFE_useRoutesImpl, UNSAFE_NavigationContext, useHref, useResolvedPath, use...
         ╵                                                             ~~~~~~~~~~~~~~~~~~~~

✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "UNSAFE_useRouteId"

    ../node_modules/react-router-dom/dist/index.js:13:213:
      13 │ ...ef, useResolvedPath, useLocation, useNavigate, createPath, UNSAFE_useRouteId, UNSAFE_RouteContext, useMatches, useNavigation, useBlock...
         ╵                                                               ~~~~~~~~~~~~~~~~~

✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "AbortedDeferredError"

    ../node_modules/react-router-dom/dist/index.js:14:9:
      14 │ export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_DataRouterContext, UN...
         ╵          ~~~~~~~~~~~~~~~~~~~~

✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "UNSAFE_useRouteId"

    ../node_modules/react-router-dom/dist/index.js:14:237:
      14 │ ...ionContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, createMemoryRouter, createPath, createRoutesFromChildren...
         ╵                                                               ~~~~~~~~~~~~~~~~~

✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "defer"

    ../node_modules/react-router-dom/dist/index.js:14:340:
      14 │ ... createPath, createRoutesFromChildren, createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRout...
         ╵                                                                     ~~~~~

✘ [ERROR] No matching export in "node_modules/react-router/dist/development/index.mjs" for import "json"

    ../node_modules/react-router-dom/dist/index.js:14:383:
      14 │ ...teRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, ...
         ╵        

Installing react-router-dom@7.0.1 fixes the issue as described here:

remix-run/react-router#12364 (comment)

What causes this issue? Should be react-router-dom@7.0.1 part of the default template?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant