title: ng build works but ng build --prod gives an error
body: <p>I am a student and very new in every part of Angular.
  I'm building a very simple site.
  When i do ng build it works but ng build --prod gives an error</p>
  
  <p>I tried ng update @ angular / cli @ angular / core.
  I removed all the services
  That did not solve the problem.</p>
  
  <p>These are the errors I get in angular cli</p>
  
  <pre><code>ng build --prod
  ...
  ...
  ...
  
  ERROR in : Error: Internal error: unknown identifier [{"filePath":"C:/Users/user/source/repos/Angular/matanyaDayfani/node_modules/@angular/common/common.d.ts","name":"LocationStrategy","members":[]}]
      at Object.importExpr$$1 [as importExpr] (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:24170:27)
      at tokenExpr (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:19863:43)
      at providerDef (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:19789:24)
      at C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:19959:81
      at Array.map (&lt;anonymous&gt;)
      at NgModuleCompiler.compile (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:19959:48)
      at AotCompiler._compileModule (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:24115:36)
      at C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:24034:70
      at Array.forEach (&lt;anonymous&gt;)
      at AotCompiler._compileImplFile (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:24034:23)
      at C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:24024:74
      at Array.map (&lt;anonymous&gt;)
      at AotCompiler.emitAllImpls (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler\bundles\compiler.umd.js:24024:39)
      at AngularCompilerProgram.generateFilesForEmit (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler-cli\src\transformers\program.js:620:46)
      at AngularCompilerProgram._emitRender2 (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler-cli\src\transformers\program.js:266:47)
      at AngularCompilerProgram.emit (C:\Users\user\source\repos\Angular\matanyaDayfani\node_modules\@angular\compiler-cli\src\transformers\program.js:201:22)
  </code></pre>
  
  <p>In the picture you can see the changes in the package.json file from the beginning until now</p>
  
  <p><a href="https://i.stack.imgur.com/pSSML.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pSSML.png" alt="enter image description here"></a></p>