install-peer
v1.4.0
Published
Install all peer dependencies required by current package
Downloads
61
Maintainers
Readme
install-peer
CLI library to install peer dependencies
npm i install-peer
Overview
NPM v6 does not install peer dependencies automnatically instead it displays a warning , and asks developer to install the required peer dependencies
npm WARN @test/[email protected] requires a peer of @test/d@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @test/[email protected] requires a peer of @test/g@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @test/[email protected] requires a peer of @test/p@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @test/[email protected] requires a peer of @test/j@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @test/[email protected] requires a peer of @test/y@^1.0.0 but none is installed. You must install peer dependencies yourself.
This CLI Tool parses this message and installs the peer dependencies recursivesly , till all peer dependencies are installed
Install
npm i install-peer
Usage
through CLI
npx install-peer [dir]
if dir is omitted installs peer dependencies in current working directory
through API
import { installAllPeerDependencies } from "install-peer";
const dir = process.argv[2] || process.cwd();
installAllPeerDependencies(dir)
.then(() => {
console.log("Done");
})
.catch(err => {
console.error("Error Occurred");
console.error(err);
});
Support
This project is a part of Open Source Intitiative from Sodaru Technologies
Write an email to [email protected] for queries on this project