title: Angular 5 Error:Trying to import a source file from a node_modules /node_modules/ngx-bootstrap/typeahead/typeahead-container.component.ngfactory.ts
body: <p>Do you have anybody some advice, idea, how can I fix the following error?</p>
  
  <p>This occurred when I ran production build.
  It's more interesting when I ran the production build with -aot=false it was successes.</p>
  
  <p>ERROR in : Error: Trying to import a source file from a node_modules package: import C:...search-scrollbar.directive.ts from C:
  .../node_modules/ngx-bootstrap/typeahead/typeahead-container.component.ngfactory.ts
      at TsCompilerAotCompilerTypeCheckHostAdapter.fileNameToModuleName (C:...\node_modules\@angular\compiler-cli\src\transformers\compiler_host.js:187:19)
      at AotCompiler._fileNameToModuleName (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:31099:24)
      at Object.importExpr$$1 [as importExpr] (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:31067:55)
      at singleProviderDef (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:20028:28)
      at providerDef (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:19962:9)
      at ViewBuilder._visitProviderOrDirective (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:28177:18)
      at ViewBuilder._visitDirective (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:28025:23)
      at C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:27926:32
      at Array.forEach (native)
      at ViewBuilder._visitElementOrTemplate (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:27916:23)
      at ViewBuilder.visitElement (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:27820:23)
      at ElementAst.visit (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:925:24)
      at visit (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:1366:37)
      at C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:1368:42
      at Array.forEach (native)
      at templateVisitAll (C:...\node_modules\@angular\compiler\bundles\compiler.umd.js:1367:10)</p>