package
Check if node_modules match package.json versions. npm / yarn install shortcut.
npm install deps-installGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 3 packages.
148.3 kB
Includes dependencies.
Instantly check if node_modules match package.json versions. Returns list of pkgs that don't.
Inspired by check-dependencies, which itself has too many dependencies.
npm install deps-install
const {checkDeps, installDeps} = require('deps-install');
(async () => {
// rootPath must have package.json and node_modules
const deps = await checkDeps(rootPath);
console.log(deps.length > 0 ? 'Doing npm install' : 'All clear!');
if (deps.length) await installDeps(rootPath);
})();MIT License (c) 2019, Paul Miller (https://paulmillr.com)