title: Error: Can't resolve './app/app.module.ngfactory' in 'C:\projects\Project-CMS\Project.Web\src'
body: <p>When I Create Build for my angular 5 Application I am getting the below error.</p>
  
  <p>its working fine when I create build</p>
  
  <pre><code>ng build 
  </code></pre>
  
  <p>it's showing error when I create buildproductionttion</p>
  
  <pre><code>ng build --prod
  </code></pre>
  
  <p>i am not using the ngfactory anywhere in my application.</p>
  
  <blockquote>
    <p>ERROR in ./src/main.ts Module not found: Error: Can't resolve
    './app/app.module.ngfactory' in
    'C:\projects\Project-CMS\Project.Web\src' resolve
    './app/app.module.ngfactory' in
    'C:\projects\Project-CMS\Project.Web\src'   using description file:
    C:\projects\Project-CMS\Project.Web\package.json (relative path:
    ./src)
        Field 'browser' doesn't contain a valid alias configuration   after using description file:
    C:\projects\Project-CMS\Project.Web\package.json (relative path:
    ./src)
        using description file: C:\projects\Project-CMS\Texakoma.Web\package.json (relative path:
    ./src/app/app.module.ngfactory)
          no extension
            Field 'browser' doesn't contain a valid alias configuration
            C:\projects\Project-CMS\Project.Web\src\app\app.module.ngfactory
    doesn't exist
          .ts
            Field 'browser' doesn't contain a valid alias configuration
            C:\projects\Project-CMS\Project.Web\src\app\app.module.ngfactory.ts
    doesn't exist
          .js
            Field 'browser' doesn't contain a valid alias configuration
            C:\projects\Project-CMS\Project.Web\src\app\app.module.ngfactory.js
    doesn't exist
          as directory
            C:\projects\Project-CMS\Project.Web\src\app\app.module.ngfactory
    doesn't exist
    [C:\projects\Project-CMS\Project.Web\src\app\app.module.ngfactory]
    [C:\projects\Project-CMS\Project.Web\src\app\app.module.ngfactory.ts]
    [C:\projects\Project-CMS\Project.Web\src\app\app.module.ngfactory.js]
    [C:\projects\Project-CMS\Project.Web\src\app\app.module.ngfactory] 
    @ ./src/main.ts 4:0-66  @ multi ./src/main.ts</p>
  </blockquote>