A dependency is any piece of code or service your project relies on but did not write itself, such as a library, a framework or a database driver. Direct dependencies are the ones you list; transitive dependencies are those your dependencies need in turn.
Why it matters
Dependencies save huge amounts of work, but each one adds risk: security flaws, breaking changes, abandoned projects and license obligations. A typical web project can pull in hundreds of transitive packages. Keeping them updated and locked to known versions is a routine part of maintenance.
Example
{
"dependencies": {
"express": "^4.19.2"
}
}
Installing express also installs the packages it needs, recorded in a lock file such as package-lock.json so every machine gets identical versions.
Common mistakes
- Never updating, which leaves known vulnerabilities in place.
- Adding a large package for one tiny helper function.
- Not committing the lock file, so builds differ between machines and fail unexpectedly.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.