webpack-aot icon indicating copy to clipboard operation
webpack-aot copied to clipboard

Where are ngfactory files?

Open dgpuranik opened this issue 8 years ago • 2 comments

Your repo is compiling fine under AOT. I used the same config for my project and I am getting following exception:

ERROR in ./src/main.aot.ts
Module build failed: Error: /Users/webapp/src/main.aot.ts (3,34): Cannot find module './ngfactory/app/app.module.ngfactory'.)
    at _checkDiagnostics (/Users/webapp/node_modules/@ngtools/webpack/src/loader.js:145:15)
    at /Users/webapp/node_modules/@ngtools/webpack/src/loader.js:172:17
 @ multi (webpack)-dev-server/client?http://localhost:5000 ./src/main.aot.ts

I am not seeing ngfactory files when I compile your repo.

dgpuranik avatar May 24 '17 12:05 dgpuranik

Same, no NgFactory files being produced.

git clone (repo)
npm i && npm run build

Results in:

ERROR in ./app/main.aot.ts
Module not found: Error: Can't resolve './ngfactory/app/app.module.ngfactory' in 'C:\Source\GitHub\webpack-aot\app'
 @ ./app/main.aot.ts 3:0-74

ERROR in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
Module not found: Error: Can't resolve 'C:\Source\GitHub\webpack-aot\app\ngfactory' in 'C:\Source\GitHub\webpack-aot\node_modules\@angular\core\src\linker'
 @ ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js 69:15-36 85:15-102
 @ ./~/@angular/core/src/linker.js
 @ ./~/@angular/core/src/core.js
 @ ./~/@angular/core/index.js
 @ ./~/@angular/platform-browser/src/browser.js
 @ ./~/@angular/platform-browser/src/platform-browser.js
 @ ./~/@angular/platform-browser/index.js
 @ ./app/main.aot.ts
Child app\app.component.html:
       [0] ./app/app.component.html 144 bytes {0} [built]
Child app\app.component.scss:
       [0] ./app/app.component.scss 49 bytes {0} [built]

IAMtheIAM avatar Jul 26 '17 21:07 IAMtheIAM

You get the same error with lazy loading modules as well

ndcunningham avatar Aug 01 '17 17:08 ndcunningham