Skip to content

[Bug]: react-router-dom tried to access @remix-run/router, but it isn't declared in its dependencies #9298

@simPod

Description

@simPod

What version of React Router are you using?

6.4.0

Steps to Reproduce

Require with Yarn pnp which is strict about declaring dependencies.

Expected Behavior

No issues

Actual Behavior

Yarn pnp gives:

react-router-dom tried to access @remix-run/router, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

If a package uses a dependency, it must be declared in that package. Providing it via sub-level dep is not correct.

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