Skip to content

[Bug]: "Cannot find module './index' or its corresponding type declarations" in react-router-dom/server.d.ts #11509

Closed
electrode-io/electrode
#2011
@neoGeneva

Description

@neoGeneva

What version of React Router are you using?

6.23.0

Steps to Reproduce

Install react-router-dom in a TS project, and attempt to compile the project.

Expected Behavior

The project compiles.

Actual Behavior

An error is raised during compilation:

node_modules/react-router-dom/server.d.ts:3:58 - error TS2307: Cannot find module './index' or its corresponding type declarations.

3 import type { FutureConfig, Location, RouteObject } from "./index";
                                                           ~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions