title: jHipster production build error. Failed to run task: 'yarn run webpack:prod' failed
body: <p>I've generated <strong>monolithic application</strong> using <strong>jHipster 4.9.0</strong> and when I run <strong>mvn -Pprod package</strong> the build failed with the following errors. </p>
  
  <pre><code>[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (webpack build prod) on project itob-p: Failed to run task: 'yarn run webpack:prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -&gt; [Help 1]
  </code></pre>
  
  <p>I've also reinstalled Nodejs containing npm package 5.3.0 and also deleted the folder node_modules and re install npm on the generated folder but got no success. I'm stuck and unable to identify the problem if i'm doing something wrong please point it out. </p>
  
  <p>What is done so far :</p>
  
  <p>1) Operating system = Windows 7 64bit</p>
  
  <p>2) generated source code of nonpolitical application [yo jhipster]</p>
  
  <p>3) Database postgrase</p>
  
  <p>4) OAuth2</p>
  
  <p>5) mvn -Pprod package</p>
  
  <p>6) <strong>successfully deploys on Pivotal Cloud Foundry in [Dev] mode</strong> </p>
  
  <p>Note this issue occurs while making build for production.</p>
  
  <p>here is the complete stack of this command.
  I'm unable to identify and understand the problem. Please help me and if you have any kind of suggestion please share.<br>
  Here is the complete stack of error.</p>
  
  <pre><code>[INFO]
  [INFO] --- frontend-maven-plugin:1.6:yarn (webpack build prod) @ itob-p ---
  [INFO] Running 'yarn run webpack:prod' in C:\Users\hassnan.ali\Desktop\del.me\postgres2
  [INFO] yarn run v1.1.0
  [INFO] $ yarn run cleanup &amp;&amp; yarn run webpack:prod:main &amp;&amp; yarn run clean-www
  [ERROR] warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarde
  d as-is to the scripts.
  [INFO] Starting compilation using the angular compiler.
  [ERROR] (node:7220) DeprecationWarning: Chunk.modules is deprecated. Use     Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead.
  [INFO] Angular compilation done, starting webpack bundling.
  [ERROR] TypeError: Cannot read property 'flags' of undefined
  [ERROR]     at checkUnreachable     (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescrip
  t.js:20770:30)
  [ERROR]     at bindChildrenWorker     (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-    wrapped\node_modules\typescript\lib\typescript.js:19014:17)
  [ERROR]     at bindChildren (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js
  :18969:17)
  [ERROR]     at bind (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:20199:2
  1)
  [ERROR]     at bindSourceFile (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.
  js:18588:17)
  [ERROR]     at Object.bindSourceFile (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\type
  script.js:18539:9)
  [ERROR]     at initializeTypeChecker (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\type
  script.js:44253:20)
  [ERROR]     at Object.createTypeChecker (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\t
  ypescript.js:23058:9)
  [ERROR]     at getDiagnosticsProducingTypeChecker (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\node_modules\typesc
  ript\lib\typescript.js:70194:93)
  [ERROR]     at Object.getGlobalDiagnostics (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\node_modules\typescript\li
  b\typescript.js:70570:53)
  [ERROR]     at Tsc.typeCheck (C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-    wrapped\src\tsc.js:166:23)
  [ERROR]     at C:\Users\hassnan.ali\Desktop\del.me\postgres2\node_modules\@angular\tsc-wrapped\src\main.js:122:23
  [ERROR]     at process._tickCallback (internal/process/next_tick.js:109:7)
  [ERROR] error Command failed with exit code 1.
  [ERROR] error Command failed with exit code 1.
  [ERROR] error Command failed with exit code 1.
  [INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation     about this command.
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 13:43 min
  [INFO] Finished at: 2017-12-13T13:08:13+05:00
  [INFO] Final Memory: 30M/208M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (webpack build prod) on project itob-p: Failed to run task: 'yarn ru
  n webpack:prod' 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
  </code></pre>