damienbod / AngularWebpackVisualStudio

Template for ASP.NET Core, Angular with Webpack and Visual Studio
https://damienbod.com/2016/06/12/asp-net-core-angular2-with-webpack-and-visual-studio/
MIT License
488 stars 128 forks source link

AOT Build Fail #144

Closed SaiKrishnaTej23 closed 6 years ago

SaiKrishnaTej23 commented 6 years ago

ERROR in C:/Users/VSConnect/source/Workspaces/HR-Connect/ConnectWeb/Connect/src/Connect/angularApp/main-aot.ts (4,36): Cannot find module '../aot/angularApp/app/app.module.ngfactory'. ERROR in Could not resolve "angularApp/app/app.module" from "angularApp/app/app.module". ERROR in C:/Users/VSConnect/source/Workspaces/HR-Connect/ConnectWeb/Connect/src/Connect/angularApp/main-aot.ts (4,36): Cannot find module '../aot/angularApp/app/app.module.ngfactory'. ERROR in ./angularApp/main-aot.ts Module not found: Error: Can't resolve '../aot/angularApp/app/app.module.ngfactory' in 'C:\Users\VSConnect\source\Workspaces\HR-Connect\ConnectWeb\Connect\src\Connect\angularApp' @ ./angularApp/

tsconfig-aot.json

{ "compilerOptions": { "target": "es5", "module": "es2015", "moduleResolution": "node", "sourceMap": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": true, "noImplicitAny": true, "suppressImplicitAnyIndexErrors": true, "skipLibCheck": true, "lib": [ "es2015", "dom" ] }, "angularCompilerOptions": { "entryModule": "./angularApp/app/app.module#AppModule", "skipMetadataEmit": true }, "compileOnSave": false, "buildOnSave": false }

main-aot.ts

import { enableProdMode } from '@angular/core'; import { platformBrowser } from '@angular/platform-browser';

import { AppModuleNgFactory } from '../aot/angularApp/app/app.module.ngfactory';

// Entry point for AoT compilation. declare var System: any; // Styles. enableProdMode();

platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

damienbod commented 6 years ago

We have updated to Angular 6 , Webpack 4