You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

exec-npm-install

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exec-npm-install

Calls npm install in a child_process to prevent npm to take too much memory

1.0.2
Source
npm
Version published
Maintainers
1
Created
Source

exec-npm-install

Calls npm install in a child_process to prevent npm to take too much memory

Usage

var execNpmInstall = require('exec-npm-install');

var options = {
  // modules to install
  modules: [
    'kevoree-node-javascript',
    'kevoree-comp-ticker',
    'kevoree-group-ws'
  ],
  // install path (nb. '/path/to/somewhere' => '/path/to/somewhere/node_modules')
  prefix: '/path/to/somewhere'
};

execNpmInstall(options, function (err) {
  if (err) {
    console.log('Error: '+err.message);
  } else {
    console.log('Install sucess');
  }
});

NB. When you specify a prefix, npm will always append to it the node_modules folder.

Keywords

npm

FAQs

Package last updated on 29 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts