title: Entry module not found: Error: Can't resolve 'html-webpack-plugin/lib/loader.j s'
body: <p>I upgraded from <code>angular-cli@1.0.0-beta.21</code> to <code>angular-cli@1.0.0-beta.25.5</code>, making all necessary changes to get my app running with <code>ng serve</code> successfully. However, when I attempt to deploy to Heroku, it fails with the curious error below.</p>
  
  <pre><code>remote:        ERROR in   Error: Child compilation failed:
  remote:        Entry module not found: Error: Can't resolve 'html-webpack-plugin/lib/loader.j  s' in '/tmp/build_7c419ad06257b748ec6f7c819360bd4b':
  remote:        Error: Can't resolve 'html-webpack-plugin/lib/loader.js' in '/tmp/build_7c419a  d06257b748ec6f7c819360bd4b'
  remote:        
  remote:        - compiler.js:76
  remote:        [lib]/[angular-cli]/[html-webpack-plugin]/lib/compiler.js:76:16
  remote:        
  remote:        - Compiler.js:280 Compiler.&lt;anonymous&gt;
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compiler.js:280:10
  remote:        
  remote:        - Compiler.js:480
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compiler.js:480:13
  remote:        
  remote:        - Tapable.js:138 next
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:138:11
  remote:        
  remote:        - CachePlugin.js:62 Compiler.&lt;anonymous&gt;
  remote:        [lib]/[angular-cli]/[webpack]/lib/CachePlugin.js:62:5
  remote:        
  remote:        - Tapable.js:142 Compiler.applyPluginsAsyncSeries
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:142:13
  remote:        
  remote:        - Compiler.js:477
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compiler.js:477:10
  remote:        
  remote:        - Tapable.js:138 next
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:138:11
  remote:        
  remote:        - suppress-entry-chunks-webpack-plugin.js:38 Compilation.&lt;anonymous&gt;
  remote:        [lib]/[angular-cli]/plugins/suppress-entry-chunks-webpack-plugin.js:38:17
  remote:        
  remote:        - Tapable.js:142 Compilation.applyPluginsAsyncSeries
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:142:13
  remote:        
  remote:        - Compilation.js:615 self.applyPluginsAsync.err
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compilation.js:615:19
  remote:        
  remote:        - Tapable.js:131 Compilation.applyPluginsAsyncSeries
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:131:46
  remote:        
  remote:        - Compilation.js:606 self.applyPluginsAsync.err
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compilation.js:606:11
  remote:        
  remote:        - Tapable.js:138 next
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:138:11
  remote:        
  remote:        - UglifyJsPlugin.js:140 Compilation.compilation.plugin
  remote:        [lib]/[angular-cli]/[webpack]/lib/optimize/UglifyJsPlugin.js:140:5
  remote:        
  remote:        - Tapable.js:142 Compilation.applyPluginsAsyncSeries
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:142:13
  remote:        
  remote:        - Compilation.js:601 self.applyPluginsAsync.err
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compilation.js:601:10
  remote:        
  remote:        - Tapable.js:131 Compilation.applyPluginsAsyncSeries
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:131:46
  remote:        
  remote:        - Compilation.js:597 sealPart2
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compilation.js:597:9
  remote:        
  remote:        - Tapable.js:131 Compilation.applyPluginsAsyncSeries
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:131:46
  remote:        
  remote:        - Compilation.js:545 Compilation.seal
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compilation.js:545:8
  remote:        
  remote:        - Compiler.js:474
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compiler.js:474:16
  remote:        
  remote:        - Tapable.js:225
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:225:11
  remote:        
  remote:        - Compilation.js:452 _addModuleChain
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compilation.js:452:11
  remote:        
  remote:        - Compilation.js:345 Compilation.errorAndCallback
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compilation.js:345:4
  remote:        
  remote:        - Compilation.js:362 moduleFactory.create
  remote:        [lib]/[angular-cli]/[webpack]/lib/Compilation.js:362:12
  remote:        
  remote:        - NormalModuleFactory.js:234
  remote:        [lib]/[angular-cli]/[webpack]/lib/NormalModuleFactory.js:234:19
  remote:        
  remote:        - NormalModuleFactory.js:59 onDoneResolving
  remote:        [lib]/[angular-cli]/[webpack]/lib/NormalModuleFactory.js:59:20
  remote:        
  remote:        - NormalModuleFactory.js:126
  remote:        [lib]/[angular-cli]/[webpack]/lib/NormalModuleFactory.js:126:20
  remote:        
  remote:        - async.js:3694
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:3694:9
  remote:        
  remote:        - async.js:356
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:356:16
  remote:        
  remote:        - async.js:934 iteratorCallback
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:934:13
  remote:        
  remote:        - async.js:840
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:840:16
  remote:        
  remote:        - async.js:3691
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:3691:13
  remote:        
  remote:        - async.js:21 apply
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:21:25
  remote:        
  remote:        - async.js:56
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:56:12
  remote:        
  remote:        - async.js:1013
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:1013:9
  remote:        
  remote:        - async.js:356
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:356:16
  remote:        
  remote:        - async.js:934 iteratorCallback
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:934:13
  remote:        
  remote:        - async.js:840
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:840:16
  remote:        
  remote:        - async.js:1010
  remote:        [lib]/[angular-cli]/[async]/dist/async.js:1010:13
  remote:        
  remote:        - NormalModuleFactory.js:262
  remote:        [lib]/[angular-cli]/[webpack]/lib/NormalModuleFactory.js:262:19
  remote:        
  remote:        - Resolver.js:70 onResolved
  remote:        [lib]/[angular-cli]/[webpack]/[enhanced-resolve]/lib/Resolver.js:70:11
  remote:        
  remote:        - createInnerCallback.js:31 loggingCallbackWrapper
  remote:        [lib]/[angular-cli]/[webpack]/[enhanced-resolve]/lib/createInnerCallback.js:    31:19
  remote:        
  remote:        - Resolver.js:138 afterInnerCallback
  remote:        [lib]/[angular-cli]/[webpack]/[enhanced-resolve]/lib/Resolver.js:138:10
  remote:        
  remote:        - createInnerCallback.js:31 loggingCallbackWrapper
  remote:        [lib]/[angular-cli]/[webpack]/[enhanced-resolve]/lib/createInnerCallback.js:    31:19
  remote:        
  remote:        - Tapable.js:181 Resolver.applyPluginsAsyncSeriesBailResult1
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:181:46
  remote:        
  remote:        - Resolver.js:125 innerCallback
  remote:        [lib]/[angular-cli]/[webpack]/[enhanced-resolve]/lib/Resolver.js:125:19
  remote:        
  remote:        - createInnerCallback.js:31 loggingCallbackWrapper
  remote:        [lib]/[angular-cli]/[webpack]/[enhanced-resolve]/lib/createInnerCallback.js:    31:19
  remote:        
  remote:        - Tapable.js:283
  remote:        [lib]/[angular-cli]/[tapable]/lib/Tapable.js:283:15
  remote:        
  remote:        - UnsafeCachePlugin.js:39
  remote:        [lib]/[angular-cli]/[webpack]/[enhanced-resolve]/lib/UnsafeCachePlugin.js:39    :4
  remote:        
  remote:        
  </code></pre>
  
  <p>I know very little about the internals of Angular CLI and WebPack (and friends) so it not clear to me if this is a webpack or html-webpack-plugin issue. Any ideas???</p>
  
  <p><strong>NOTES:</strong></p>
  
  <ul>
  <li><code>package.json</code> syntax is valid;</li>
  <li><code>ng serve</code> works on local Linux machine;</li>
  <li><code>ng serve --prod</code> works on local Linux machine;</li>
  <li>adding <code>html-webpack-plugin</code> dependency changes nothing;</li>
  <li>adding <code>webpack</code> dependency changes nothing;</li>
  <li>project files are all UNIX encoded;</li>
  <li><code>html-webpack-plugin@2.26.0</code>;</li>
  <li><code>webpack@2.2.0</code>;</li>
  <li><code>@ngtools/webpack@1.2.4</code>;</li>
  </ul>