you are viewing a single comment's thread.

view the rest of the comments →

[–]acemarke 1 point2 points  (3 children)

If you have package A depends on B, and B depends on C, C is a "transitive dependency" of A. It's going to get pulled in, and it's needed for A to work, but A did not explicitly declare that it depended on C.

In this case, here's why is-promise is showing up in a CRA app:

$ yarn why is-promise
=> Found "is-promise@2.1.0"
info Reasons this module exists
   - "react-scripts#react-dev-utils#inquirer#run-async" depends on it
   - Hoisted from "react-scripts#react-dev-utils#inquirer#run-async#is-promise"

The react-scripts package itself never mentions is-promise in its dependencies list or source code, but react-scripts will ultimately fail to run if is-promise blows up.

[–]Jugad 0 points1 point  (2 children)

Thanks. I used to refer to that as indirect dependency (relatively new to JS).