Skip to content

Why "react-dnd" is in both "dependencies" and "peerDependencies"? #683

@nikitaindik

Description

@nikitaindik

Relevant parts of package.json:

{
  "name": "react-sortable-tree",
  "version": "2.7.1",
  "dependencies": {
   ...
    "react-dnd": "^9.3.4"
  },
  "peerDependencies": {
    ...
    "react-dnd": "^7.3.0"
  },
  ...
}

As you can see "react-dnd" is specified in "dependencies" and "peerDependencies". Shouldn't it be either one or another?

This leads to unnecessary warning during package install.
npm WARN react-sortable-tree@2.7.1 requires a peer of react-dnd@^7.3.0 but none is installed. You must install peer dependencies yourself.

Should we remove "react-dnd" from "dependencies" or "peerDependencies"? Is there a reason for having both?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions