code: private void install() {
          File directory = getNPMDirectory();
          if (directory.isDirectory()) {
              // Check the version
              String version = getVersionFromNPM(directory, log);
              // Are we looking for a specific version ?
              if (npmVersion != null) {
                  // Yes
                  if (!npmVersion.equals(version)) {
                      log.info("The NPM " + npmName + " is already installed but not in the requested version" +
                              " (requested: " + npmVersion + " - current: " + version + ") - uninstall it");
                      try {
                          FileUtils.deleteDirectory(directory);
                      } catch (IOException e) { //NOSONAR
                          // ignore it.
                      }
                  } else {
                      log.debug("NPM " + npmName + " already installed in " + directory.getAbsolutePath() +
                              " (" + version + ")");
                      return;
                  }
              } else {
                  // No
                  log.debug("NPM " + npmName + " already installed in " + directory.getAbsolutePath() + " " +
                          "(" + version + ")");
                  return;
              }
          }
  
          StringBuilder command = new StringBuilder();
          command.append("install ");
          if (installArguments != null) {
              for (String s : installArguments) {
                  command.append(s);
                  command.append(" ");
              }
          }
  
          if (npmVersion != null) {
              command.append(npmName).append("@").append(npmVersion);
          } else {
              command.append(npmName);
          }
  
          try {
              node.factoryForNPMInstallation().getNpmRunner(node.proxy()).execute(command.toString());
          } catch (TaskRunnerException e) {
              log.error("Error during the installation of the NPM " + npmName + " - check log", e);
          }
      }
docs: Installs the NPM. The NPM is installed using {@code npm install npm@version}, without the {@code -g} option.
  The installation is executed from the installation directory of node.