code: private void updateNPMExecutable(NodeInstallationInformation information) throws MojoExecutionException {
      getLog().info("Installing specified npm version " + npmVersion);
      NpmInstallTask npmInstallTask = new NpmInstallTask();
      npmInstallTask.setLog(getLog());
      npmInstallTask.setNpmBundledWithNodeJs(true);
      npmInstallTask.setArguments(new String[] {
          "--prefix", information.getNodeModulesRootPath(), "--global", "npm@" + npmVersion
      });
      npmInstallTask.execute(information);
    }
docs: Makes sure the specified npm version is installed in the base directory, regardless in which environment.
  @param information
  @throws MojoExecutionException