# Dependency Hell

> When the packages you need each want a version of a third one, and they clash.

**Field:** Software Development  
**Category:** Editors & Tools  
**Also known as:** Dependency Conflict, Version Conflict, DLL Hell

## Think of it like

It is like two friends who both need the one red pen at the same time.

## Definition

Dependency hell is when the packages a project needs ask for versions that cannot all fit together. Say package A needs version 1 of package C, but package B needs version 2. Only one copy of C may be allowed, so the install fails or one part breaks. The tangle grows as packages need other packages. Lockfiles, pinning and careful updates keep it small.

## Example

Jack adds a new chart package. The install fails, because it needs a newer date package than his old form package allows.

## Example code

```console
$ npm install chart-kit
npm error ERESOLVE unable to resolve dependency tree
```

npm stops with this error when two packages want versions that clash.

## Why it matters

It can freeze a project on old versions for months. Each update you skip makes the next one harder.

## Common mistake

Forcing the install with a flag that skips the check. The clash is still there, and it shows up later as a bug.

## Three principles

- **Clashing needs.** Two parts want two versions of one.
- **It spreads.** Packages need packages that need packages.
- **Update often.** Small steps keep the clashes small.

## Related terms

- [Dependency](https://learn.benibix.com/term/development/dependency)
- [Version Pinning](https://learn.benibix.com/term/development/version-pinning)
- [Lockfile](https://learn.benibix.com/term/development/lockfile)
- [Semantic Versioning (SemVer)](https://learn.benibix.com/term/development/semantic-versioning)
- [Package Manager](https://learn.benibix.com/term/development/package-manager)
- [Breaking Change](https://learn.benibix.com/term/development/breaking-change)

## Taught in

- [Lockfiles and Version Pinning](https://learn.benibix.com/learn/development-tools/lockfiles-and-version-pinning): Coding Tools, 10/13

![An app box at the top needs two packages, A and B. A asks for package C at version 1, and B asks for C at version 2. Both arrows meet at one box for C, marked as a clash, since only one version fits. At the bottom, a pinned line reads react 18.3.1, beside a range line that reads ^18.3.1 and allows any later 18.x version.](https://learn.benibix.com/diagrams/dev5-version-conflict.svg)

---

Source: https://learn.benibix.com/term/development/dependency-hell
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
