dart-resolve-package-conflicts

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

1|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/sohampawar1866/zeromile-go --skill dart-resolve-package-conflicts-sohampawar1866
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dart-resolve-package-conflicts
Source: https://github.com/sohampawar1866/zeromile-go/tree/main/.agents/skills/dart-resolve-package-conflicts
Command: npx skills add https://github.com/sohampawar1866/zeromile-go --skill dart-resolve-package-conflicts-sohampawar1866

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When dart pub get fails due to incompatible package versions or retracted packages, developers often resort to deleting the entire lockfile, causing uncontrolled upgrades across the dependency graph. This Skill provides structured workflows to audit, upgrade, and surgically resolve Dart dependency conflicts without destabilizing the project. ## Core Features & Use Cases - Dependency Auditing: Interpret dart pub outdated output columns (Current, Upgradable, Resolvable, Latest) to identify stale or retracted packages. - Controlled Upgrades: Apply caret syntax constraints, use dart pub upgrade --tighten to bump lower bounds, and handle major version updates with manual constraint edits. - Surgical Lockfile Repair: Remove only the conflicting package's entry from pubspec.lock instead of deleting the whole file, then re-resolve with dart pub get. - Use Case: Your CI build fails because a transitive dependency was retracted. Follow the conflict resolution workflow to remove just that package's lockfile entry, re-resolve, and verify with dart pub deps and dart analyze. ## Quick Start Fix the version conflict preventing dart pub get from resolving my project's dependencies.

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, locate the YAML block for the conflicting package, and delete only that entry. Then run dart pub get to resolve a compatible version, and verify with dart pub deps. Never delete the entire lockfile, as that causes uncontrolled upgrades.

How do I upgrade Dart dependencies to the latest versions?

Run dart pub outdated to see Upgradable and Resolvable columns. Use dart pub upgrade for versions allowed by current constraints, or dart pub upgrade --tighten to update lower bounds in pubspec.yaml. For major versions, manually edit the constraint first.

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 possible given all dependencies, and Latest is the newest published version excluding prereleases.

Should I delete pubspec.lock to fix dependency resolution errors?

No, deleting the entire pubspec.lock causes uncontrolled upgrades across the whole dependency graph. Instead, remove only the specific conflicting or retracted package's entry and run dart pub get to re-resolve just that package.

How do I handle a retracted Dart package version?

Delete the retracted package's block from pubspec.lock and run dart pub get to fetch the newest compatible non-retracted version. If resolution still fails, identify the transitive dependency causing the lock and update its constraint in pubspec.yaml.

How do I enforce consistent dependency versions in Dart CI pipelines?

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