Package Exports
- fix-peer-deps
- fix-peer-deps/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fix-peer-deps) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fix-peer-deps
đ A modern CLI tool to analyze and fix peer dependency issues across multiple package managers.
Description
fix-peer-deps is a powerful command-line tool designed to simplify the often complex task of managing peer dependencies in JavaScript/Node.js projects. It addresses common challenges developers face when working with packages that have peer dependency requirements:
- đ Intelligent Detection: Automatically identifies peer dependency conflicts and missing requirements
- đ¯ Smart Resolution: Suggests the most compatible versions based on your project's constraints
- đ Universal Compatibility: Works across major package managers (npm, yarn, pnpm, bun)
- đĄ Developer-Friendly: Provides clear, actionable suggestions with copy-paste ready commands
- đ¨ Modern Interface: Features a beautiful CLI interface with progress tracking and visual feedback
Why Use fix-peer-deps?
- Save Time: Quickly identify and resolve peer dependency issues that could take hours to debug manually
- Prevent Errors: Catch peer dependency conflicts before they cause runtime issues
- Cross-Platform: Works with any package manager, making it versatile for different project setups
- Clear Guidance: Get straightforward solutions instead of cryptic error messages
- Modern Experience: Enjoy a beautiful, interactive terminal interface while fixing dependencies
How It Works
The tool performs a deep analysis of your project's dependency tree by:
- Scanning your project's package manager and lock files
- Analyzing direct and transitive dependencies
- Identifying peer dependency conflicts and missing requirements
- Generating specific, actionable solutions
- Providing clear commands to resolve each issue
Features
⨠Key Features:
- Multi-package manager support (Yarn, npm, pnpm, Bun)
- Beautiful terminal interface with colors and progress indicators
- Smart package manager detection
- Detailed analysis and suggestions
- Interactive progress tracking
- Clear, emoji-enhanced output
Installation
This package is designed to be used with package manager executors, so there's no need for a global installation:
# Using npm
npx fix-peer-deps
# Using yarn
yarn dlx fix-peer-deps
# Using pnpm
pnpm dlx fix-peer-deps
# Using bun
bunx fix-peer-depsUsage
The tool can be run in different modes:
# Analyze and get suggestions
npx fix-peer-deps
# Automatically fix issues
npx fix-peer-deps --fix
# Show help information
npx fix-peer-deps --help
# Check version
npx fix-peer-deps -v
# or
npx fix-peer-deps --versionAvailable Commands
npx fix-peer-deps: Analyzes your project and provides suggestions for fixing peer dependency issuesnpx fix-peer-deps --fix: Automatically installs missing peer dependencies and updates your projectnpx fix-peer-deps -h, --help: Shows help information and available commandsnpx fix-peer-deps -v, --version: Shows the current version of the tool
The tool will:
- đ Automatically detect your package manager
- đ Analyze your dependencies
- đ¨ Identify peer dependency issues
- đĄ Provide clear, actionable suggestions
- đ§ Automatically fix issues (when using --fix)
Supported Package Managers
- Yarn (v4.x.x)
- npm
- pnpm
- Bun
Output Example
đ Fix Peer Dependencies Tool
âšī¸ Detected package manager: yarn
đ Analysis Results
â
Found 2 peer dependency issues
Analyzing Issues |ââââââââââ| 100% || 2/2 Issues
đ§ Suggested Fixes
âšī¸ Missing Dependency: react
Required by:
âĸ @emotion/react@11.0.0
âĸ @mui/material@5.0.0
To fix, run:
yarn add react --dev
đ Additional Steps
âšī¸ 1. After installing dependencies, run: yarn install
âšī¸ 2. If issues persist, add resolutions to package.jsonChangelog
Version 1.1.0 (Latest)
- ⨠Added support for multiple package managers (npm, pnpm, Bun)
- đ¨ Enhanced terminal interface with colors and emojis
- đ Added progress bars and loading indicators
- đ Updated dependencies:
- execa: 9.5.1
- ora: 8.1.1
- Added chalk: 5.3.0
- Added cli-progress: 3.12.0
- đ Improved package manager detection
- đĄ Better suggestion formatting
- đ Various bug fixes and improvements
Version 1.0.12
- Initial public release
- Basic Yarn support
- Peer dependency analysis
- Basic terminal output
Requirements
- Node.js 14.x or higher
- One of the supported package managers installed
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Sudeepta Sarkar sudsarkar13@gmail.com
Issues
If you encounter any problems or have suggestions for improvements, please file an issue at: https://github.com/sudsarkar13/starter-apps/issues