CLI library to install peer dependencies
npm i install-peer
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
npm i install-peer
npx install-peer [dir]
if dir is omitted installs peer dependencies in current working directory
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);
});
This project is a part of Open Source Intitiative from Sodaru Technologies
Write an email to [email protected] for queries on this project