Registry / devops / install-peers-cli

install-peers-cli

JSON →
library2.2.0jsnpmunverified

install-peers-cli is a command-line interface (CLI) tool designed to manage and install a project's `peerDependencies` without unintended side effects. Currently at stable version 2.2.0, it supports both `npm` and `yarn` package managers, including `yarn workspaces`. A key differentiator is its "pure" approach: it installs peer dependencies without modifying the project's `package.json` file or updating lock files (like `package-lock.json` or `yarn.lock`). This ensures a clean development environment and predictable dependency resolution, allowing developers to manage peer dependencies manually or through CI/CD pipelines without altering the project's core dependency manifests. The release cadence appears irregular, driven by contributions and specific feature needs, rather than a fixed schedule.

npm install install-peers-cli
INSTALL
IMPORT
SIG · INSTALL-PEERS-CLI
I
install-peers-cli
devopsjavascriptv2.2.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

install-peers command
npx install-peers-cli
import { installPeers } from 'install-peers-cli'
This package is a CLI tool and its primary use is via command-line execution (e.g., via `npx` or `npm/yarn run` scripts), not programmatic `import` statements.
package.json script integration
{ "scripts": { "install-peers": "install-peers" } }
npm install install-peers-cli && install-peers
The recommended way to integrate this CLI into a project is by adding it as a `devDependency` and defining a `package.json` script to run it.
Direct local execution
./node_modules/.bin/install-peers
install-peers
If `install-peers-cli` is installed locally as a `devDependency` but not via an npm/yarn script or `npx`, it must be executed from `node_modules/.bin` or added to your PATH.

This quickstart demonstrates how to add `install-peers-cli` as a development dependency and use a `package.json` script to install declared `peerDependencies`.

{ "name": "my-project", "version": "1.0.0", "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" }, "scripts": { "install-peers": "install-peers" }, "devDependencies": { "install-peers-cli": "^2.2.0" } } // Install the CLI tool as a devDependency $ npm install --save-dev install-peers-cli // Then, run the script to install peer dependencies $ npm run install-peers // or using yarn $ yarn add --dev install-peers-cli $ yarn install-peers
install-peers-cli --version
Debug
Known issues
gotchaDespite using `install-peers-cli`, you may still encounter 'unmet peer dependency' warnings during a regular `npm install` or `yarn install`. This is expected behavior as this CLI runs after the main installation phase and doesn't modify how package managers initially process `peerDependencies`.
fix
These warnings are often harmless in this context. Ensure your `peerDependencies` are correctly listed and installed via the `install-peers` script.
affects: >=1.0.0
gotcha`install-peers-cli` does not perform version resolution or compatibility checks for peer dependencies. It simply attempts to install the specified versions. It is the developer's responsibility to ensure that the declared `peerDependencies` are compatible with the consuming project's direct dependencies.
fix
Manually review and update `peerDependencies` versions in your `package.json` to ensure they align with the versions of the packages they depend on.
affects: >=1.0.0
gotchaExecuting `install-peers` directly from the command line without `npm run` or `npx` may result in a 'command not found' error if `install-peers-cli` is only installed locally and not in your system's PATH.
fix
Always execute the command via `npm run install-peers` (if defined in scripts), `npx install-peers-cli`, or specify the full path to the executable: `./node_modules/.bin/install-peers`.
affects: >=1.0.0
Errors
Common errors & fixes
install-peers: command not found
The `install-peers` executable is not in your system's PATH, typically because it's a locally installed `devDependency`.
fix
Use `npm run install-peers` (if configured in `package.json` scripts) or `npx install-peers-cli`.
npm ERR! Failed at the my-package@1.0.0 install-peers script.
An error occurred during the execution of the `install-peers` script defined in your `package.json`.
fix
Check the output immediately preceding this error for more specific details from `install-peers-cli` (e.g., dependency resolution issues, network problems).
'install-peers' is not recognized as an internal or external command, operable program or batch file.
This is the Windows equivalent of 'command not found', indicating the executable is not accessible from your current shell.
fix
Ensure `install-peers-cli` is installed as a `devDependency` and run it using `npm run install-peers` or `npx install-peers-cli`.
Upgrade
Version history
2.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
install-peers-cli — npm install install-peers-cli · libregistry