

bundledDependencies which is discussed on the following question: Advantages of bundledDependencies over normal dependencies in npm.we don't need to test B to test A, so B's testing dependencies can be left out. Transitivity (mentioned by Ben Hutchison):ĭependencies are installed transitively: if A requires B, and B requires C, then C gets installed, otherwise, B could not work, and neither would A.ĭevDependencies is not installed transitively. in version 7 peerDependencies are automatically installed unless an upstream dependency conflict is present that cannot be automatically resolved.When running, if the dependency is missing, you get an error (mentioned by This explains it nicely: expected to start on 3.0 (untested): give a warning if missing on npm install, and you have to solve the dependency yourself manually.before 3.0: are always installed if missing, and raise an error if multiple incompatible versions of the dependency would be used by different dependencies.
NPM ADD PEERDEPENDENCIES INSTALL
not installed on npm install "$package" on any other directory, unless you give it the -dev option.also installed on npm install on a directory that contains package.json, unless you pass the -production flag (go upvote Gayan Charith's answer), or if the NODE_ENV=production environment variable is set.

