Resolving Bower Dependency Conflicts with resolutions
Use Bower's resolutions field to automatically choose one version of a conflicting dependency so installs run without interaction.
15 Sept 2026, 10:46 UTC

The problem: Bower stops and asks when dependencies disagree
Bower installs every package into a single flat directory, conventionally bower_components/, and allows only one installed version per package name. If your application depends on jquery 3.x while another dependency, such as a legacy plugin, requires jquery 1.x, Bower cannot install both side by side. During bower install it normally prints a conflict prompt and waits for a human to choose. That works on a developer workstation, but it hangs a continuous integration (CI) job or automated deploy because no one is there to answer.
Useful takeaway: add a resolutions map to bower.json. It tells Bower which version expression wins for each conflicting package, so bower install completes without interaction. This makes Bower usable in CI, but the flat-tree design means the losing dependency receives the winning version and can break at runtime if it depends on the older API.
Worked configuration
Assume a project root containing bower.json. The example below is illustrative; substitute your own package names and versions.
{
"name": "my-application",
"dependencies": {
"jquery": "^3.6.0",
"legacy-plugin": "^1.2.0"
},
"resolutions": {
"jquery": "^3.6.0"
}
}
If legacy-plugin's own manifest declares jquery#^1.12.0, Bower sees two incompatible requirements for jquery. Without the resolutions entry, it pauses and asks which version to install. With the entry, Bower selects the 3.x expression for the entire flat tree and proceeds.
The resolutions key maps a package name to a version expression. Expressions can be exact tags such as 3.6.0 or ranges such as ^3.6.0. A range still resolves to the newest matching tag at install time, so it is not a lockfile. For reproducible CI, pin exact versions:
"resolutions": {
"jquery": "3.6.0"
}
Commands and verification
Run these commands in the project root, where bower.json lives. No special permissions are required unless the target directory is read-only.
bower install— installs dependencies and appliesresolutions. In CI, usebower install --config.interactive=falseso an unresolved conflict fails immediately instead of hanging.bower list— prints the resolved dependency tree and flags remaining conflicts. After installation, confirm that the expected version appears and no conflict warning remains.bower update— re-resolves all dependencies and may select newer versions within declared ranges.bower install --force— reinstalls packages, useful after changingresolutionsbut not required for every config edit.
Expected check: after editing bower.json, run bower list and inspect the entry for the conflicted package. If the tree shows one version and no prompt appeared during install, the resolution took effect. If bower list still reports a conflict, the resolutions expression may not match the package name exactly, or another dependency may override it.
Risk: because the tree is flat, every consumer of jquery in this example receives 3.x. If legacy-plugin calls a removed 1.x API, it fails at runtime even though installation succeeded. Test the application after changing resolutions, not just the install step.
Bower behavior and flag support can vary by release. Run bower --version and confirm that --config.interactive is accepted by your installed version before relying on it in automation.
Limits and common mistakes
Flat tree means no fallback
Bower does not keep nested copies of different versions. The resolution applies globally to that package name. The losing dependency must work with the winning version, or it will break. There is no per-dependency override inside resolutions.
Resolutions go stale
An entry that solves today's conflict can mask a new one tomorrow. If an upstream dependency updates its own requirement, Bower may silently accept the old resolution and install a combination that never worked together. Re-run bower list after any dependency bump and review resolutions periodically.
Not a lockfile
Semver ranges in dependencies and resolutions float. Commit bower.json to version control, and consider committing bower_components/ or vendoring dependencies if reproducible builds are critical. Do not treat resolutions alone as a guarantee that every machine installs identical files.
Do not confuse overrides with ignore
Bower supports an overrides block for correcting another package's declared main files or dependencies, often needed when a library ships incomplete Bower metadata. The ignore field, by default, lists files excluded when your own package is consumed by someone else. They serve different purposes; using ignore to fix another package's dependency conflict will not work.
Practical engineering decision
Use resolutions only when you must keep a legacy Bower build working. Bower is in maintenance status and its maintainers direct new front-end dependency work to npm or Yarn. For new projects, avoid introducing bower_components. For existing builds, treat resolutions plus exact pins as the project's de facto lock mechanism, verify with bower list, and plan a migration path away from Bower.
Rollback for this change is simple: remove or comment out the resolutions block in bower.json, delete bower_components/ if you want a clean state, and run bower install again. The interactive prompt will return for any remaining conflict.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.