Skip to content

Erroneous peer dependency for react-router-dom #300

Description

@RMHonor

Describe the bug

This library only requires React itself to for it's core functionality (for example we use TanStack Router), however, the package.json specifies react-router-dom as a peer dependency here.

This means that default NPM behaviour will install React Router, despite it not being required.

Reproduction Steps?

Install the @okta/okta-react without a React Router project.

SDK Versions

@okta/okta-auth-js: ^7.14.1 => 7.14.1 
@okta/okta-react: ^6.10.0 => 6.10.0 
react: ^19.2.3 => 19.2.3 
react-dom: ^19.2.3 => 19.2.3 
react-hook-form: ^7.69.0 => 7.69.0 
react-router-dom: ^7.11.0 => 7.11.0 
react-virtualized: ^9.22.6 => 9.22.6

Additional Information

It may be appropriate to use peerDependenciesMeta and then mark this dependency as optional.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions