dart-resolve-package-conflicts

Diagnose and resolve Dart package version conflicts in pubspec.yaml and pubspec.lock.

Updated Jul 23, 2025
One-click install
npx skills add https://github.com/derrik-fleming/dotfiles --skill dart-resolve-package-conflicts-derrik-fleming
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dart-resolve-package-conflicts
Source: https://github.com/derrik-fleming/dotfiles/tree/main/private_dot_agents/skills/dart-resolve-package-conflicts
Command: npx skills add https://github.com/derrik-fleming/dotfiles --skill dart-resolve-package-conflicts-derrik-fleming

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When dart pub get fails because of incompatible package versions or retracted releases, developers often waste time guessing which constraint to change or dangerously delete the entire lockfile. This Skill provides structured workflows for auditing, upgrading, and surgically resolving Dart dependency conflicts. ## Core Features & Use Cases - Dependency Auditing: Interpret the Current, Upgradable, Resolvable, and Latest columns of dart pub outdated to find stale or retracted packages. - Controlled Upgrades: Use dart pub upgrade --tighten and manual constraint bumps to move to newer versions without breaking the build. - Surgical Lockfile Repair: Remove only the conflicting package's entry from pubspec.lock instead of deleting the whole file, then verify with dart pub deps, dart analyze, and dart test. - Use Case: Your CI build fails because a transitive dependency locked http to a retracted version. Follow the conflict-resolution workflow to remove just that lockfile entry, re-resolve, and confirm the dependency graph is consistent. ## Quick Start Use the dart-resolve-package-conflicts skill to fix the version conflict causing dart pub get to fail in my project.

Frequently Asked Questions about dart-resolve-package-conflicts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Dart package version conflicts when pub get fails?▼

Open pubspec.lock, delete only the YAML block for the conflicting package, then run dart pub get to re-resolve that package. Never delete the entire lockfile, since that triggers uncontrolled upgrades across the whole dependency graph.

How to upgrade Dart dependencies to the latest compatible versions?▼

Run dart pub outdated to see Upgradable and Resolvable columns. Use dart pub upgrade for constraint-allowed updates, dart pub upgrade --tighten to bump lower bounds automatically, or manually edit pubspec.yaml constraints for major version jumps.

What do the columns in dart pub outdated mean?▼

Current is the version in pubspec.lock, Upgradable is the latest allowed by your pubspec.yaml constraints, Resolvable is the latest achievable given all dependencies, and Latest is the newest published version excluding prereleases.

Why should I not delete the entire pubspec.lock file?▼

Deleting the whole lockfile forces pub to re-resolve every dependency, causing uncontrolled upgrades across the graph. Removing only the conflicting package's entry keeps all other versions pinned while fixing the specific conflict.

How do I handle a retracted Dart package version?▼

Locate the retracted package's block in pubspec.lock and delete only that entry, then run dart pub get to fetch the newest compatible non-retracted version. Verify the result with dart pub deps to confirm the graph resolves correctly.

How do I enforce reproducible Dart builds in CI?▼

Use dart pub get --enforce-lockfile in CI/CD pipelines so the exact versions recorded in pubspec.lock are installed. This guarantees production builds match the dependency versions tested locally.