Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including npm-install-missing with all npm packages installed. Try it out:

var npmInstallMissing = require("npm-install-missing")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

npm-install-missing v0.1.4

This module will attempt to reinstall any missing dependencies. It can be called via the command line or used programmatically.


An NPM module to reinstall missing dependencies.

Build Status

I created this module after working on a project where deployments were failing due to missing module dependencies. An npm install would fail to install the required dependencies for an unknown reason and without error. Since npm install succeeds without error, there wasn't a way to tell if the dependency installation failed.

When running npm install for a second time on a project, npm will check the first level of modules to ensure they're installed, but not traverse the dependency tree to ensure all sub-module dependencies are installed. You can run npm outdated to check if modules are missing but npm won't install them for you.

This module combines npm outdated and npm install to install all missing dependencies within the dependency tree.


To be able to use this tool system-wide to install missing dependencies for all your node projects, install it globally.

npm install -g npm-install-missing


Within your project directory:


The script will check the current project directory for missing dependencies and install them automatically.


This module depends on the following modules:

  • async
  • npm


To install the devDependencies and run the test framework:

cd npm-install-missing
npm install
npm test


Please file tickets and issues using GitHub Issues


Copyright 2013 Alex Cline

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free