title: frontend-maven-plugin fails npm install
body: <p>I can use the command line to run <code>npm install</code> and <code>npm run build</code> on my project but when I try to use the frontend-maven-plugin it fails with the following error</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] Reactor Build Order:
  [INFO] 
  [INFO] app_name                                                          [pom]
  [INFO] frontend                                                           [jar]
  [INFO] backend                                                            [jar]
  [INFO] 
  [INFO] ---------------------&lt; com.flareback-domain:app_name &gt;----------------------
  [INFO] Building app_name 1.0-SNAPSHOT                                    [1/3]
  [INFO] --------------------------------[ pom ]---------------------------------
  [INFO] 
  [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ app_name ---
  [INFO] 
  [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ app_name ---
  [INFO] Installing /Users/flareback/code/app_name/pom.xml to /Users/flareback/.m2/repository/com/flareback-domain/app_name/1.0-SNAPSHOT/app_name-1.0-SNAPSHOT.pom
  [INFO] 
  [INFO] ----------------------&lt; com.flareback-domain:frontend &gt;----------------------
  [INFO] Building frontend 1.0-SNAPSHOT                                     [2/3]
  [INFO] --------------------------------[ jar ]---------------------------------
  [INFO] 
  [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ frontend ---
  [INFO] Deleting /Users/flareback/code/app_name/frontend/target
  [INFO] 
  [INFO] --- frontend-maven-plugin:1.9.1:install-node-and-npm (install node and npm) @ frontend ---
  [INFO] Node v12.14.1 is already installed.
  [INFO] 
  [INFO] --- frontend-maven-plugin:1.9.1:npm (npm install) @ frontend ---
  [INFO] Running 'npm install' in /Users/flareback/code/app_name/frontend
  [INFO] internal/modules/cjs/loader.js:796
  [INFO]     throw err;
  [INFO]     ^
  [INFO] 
  [INFO] Error: Cannot find module './internal/streams/buffer_list'
  [INFO] Require stack:
  [INFO] - /Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js
  [INFO] - /Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/readable-stream/readable.js
  [INFO] - /Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js
  [INFO] - /Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js
  [INFO] - /Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js
  [INFO] - /Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/npmlog/log.js
  [INFO] - /Users/flareback/code/app_name/frontend/node/node_modules/npm/bin/npm-cli.js
  [INFO]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
  [INFO]     at Function.Module._load (internal/modules/cjs/loader.js:686:27)
  [INFO]     at Module.require (internal/modules/cjs/loader.js:848:19)
  [INFO]     at require (internal/modules/cjs/helpers.js:74:18)
  [INFO]     at Object.&lt;anonymous&gt; (/Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:72:18)
  [INFO]     at Module._compile (internal/modules/cjs/loader.js:955:30)
  [INFO]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
  [INFO]     at Module.load (internal/modules/cjs/loader.js:811:32)
  [INFO]     at Function.Module._load (internal/modules/cjs/loader.js:723:14)
  [INFO]     at Module.require (internal/modules/cjs/loader.js:848:19) {
  [INFO]   code: 'MODULE_NOT_FOUND',
  [INFO]   requireStack: [
  [INFO]     '/Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js',
  [INFO]     '/Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/readable-stream/readable.js',
  [INFO]     '/Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-stream.js',
  [INFO]     '/Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js',
  [INFO]     '/Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/index.js',
  [INFO]     '/Users/flareback/code/app_name/frontend/node/node_modules/npm/node_modules/npmlog/log.js',
  [INFO]     '/Users/flareback/code/app_name/frontend/node/node_modules/npm/bin/npm-cli.js'
  [INFO]   ]
  [INFO] }
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary for app_name 1.0-SNAPSHOT:
  [INFO] 
  [INFO] app_name ........................................... SUCCESS [  0.279 s]
  [INFO] frontend ........................................... FAILURE [  0.438 s]
  [INFO] backend ............................................ SKIPPED
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  0.902 s
  [INFO] Finished at: 2020-02-04T10:34:21-05:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.9.1:npm (npm install) on project frontend: Failed to run task: 'npm install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  [ERROR] 
  [ERROR] After correcting the problems, you can resume the build with the command
  [ERROR]   mvn &lt;args&gt; -rf :frontend
  
  </code></pre>
  
  <p>My frontend pom file </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;frontend&lt;/artifactId&gt;
  
      &lt;parent&gt;
          &lt;artifactId&gt;app_name&lt;/artifactId&gt;
          &lt;groupId&gt;com.flareback-domain&lt;/groupId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;frontend-maven-plugin.version&gt;1.9.1&lt;/frontend-maven-plugin.version&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.github.eirslett&lt;/groupId&gt;
                  &lt;artifactId&gt;frontend-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${frontend-maven-plugin.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;install node and npm&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;install-node-and-npm&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;nodeVersion&gt;v12.14.1&lt;/nodeVersion&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;npm install&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;npm&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;arguments&gt;install&lt;/arguments&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;npm run build&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;npm&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;arguments&gt;run build&lt;/arguments&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>