Resolve Dependency Version Conflicts
Back to prompts
Resolve Dependency Version Conflicts
codingintermediateClaudeGPT
troubleshooting
Analyze package manager errors and constraints to propose safe resolution strategies with risk assessment.
Prompt
Act as an expert dependency resolver. I am encountering version incompatibilities in my project.
Context:
- Package Manager: {{package_manager}}
- Error Message: {{error_message}}
- Dependency Tree / Constraint Snippet: {{dependency_tree_snippet}}
- Additional Constraints or Notes: {{constraints}}
Your Task:
1. Identify the root cause of the conflict by analyzing the version ranges and peer dependency requirements implied by the input.
2. Propose up to 3 resolution strategies. For each, provide the exact command or configuration change required.
3. Assess risk for each strategy. Note potential breaking changes, deprecated features, or security implications associated with the proposed versions.
4. Recommend the optimal path, balancing stability against the need for updates.
Critical Instructions:
- Do not invent version numbers, package names, or behaviors not present in the input or universally known facts about the specified package manager.
- If the provided snippet does not contain enough information to determine the conflict graph (e.g., missing transitive dependencies), explicitly state what data is missing rather than guessing.
- Prioritize non-breaking resolutions unless the error forces a major change.
Output Format:
Provide a numbered list corresponding to the tasks above.When to use this
When installation commands fail due to version incompatibilities, peer dependency errors, or when you must evaluate the risk of upgrading a library that reports conflicts or warns of breaking changes.
Tips
- Include the output of a verbose listing command (e.g., ‘npm ls’, ‘pip freeze’, or ‘cargo tree’) alongside the error to give the model the full constraint graph context.
- Always verify the recommended resolution against the official changelog of the target version; LLMs may misinterpret semantic versioning nuances or miss subtle API removals.