{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/3141","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/3141/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/3141/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/3141/events","html_url":"https://github.com/angular/angular-cli/issues/3141","id":189331007,"number":3141,"title":"ng build Aot not working","user":{"login":"harilalinapp","id":12621519,"avatar_url":"https://avatars.githubusercontent.com/u/12621519?v=3","gravatar_id":"","url":"https://api.github.com/users/harilalinapp","html_url":"https://github.com/harilalinapp","followers_url":"https://api.github.com/users/harilalinapp/followers","following_url":"https://api.github.com/users/harilalinapp/following{/other_user}","gists_url":"https://api.github.com/users/harilalinapp/gists{/gist_id}","starred_url":"https://api.github.com/users/harilalinapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harilalinapp/subscriptions","organizations_url":"https://api.github.com/users/harilalinapp/orgs","repos_url":"https://api.github.com/users/harilalinapp/repos","events_url":"https://api.github.com/users/harilalinapp/events{/privacy}","received_events_url":"https://api.github.com/users/harilalinapp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-15T08:42:03Z","updated_at":"2016-11-16T04:20:48Z","closed_at":null,"body":"When i run ng build -prod --aot i got this error.\r\n\r\n> AuthModule is not an NgModule\r\n\r\nMy module is \r\n\r\n```\r\nimport { NgModule } from \"@angular/core\"\r\n\r\nimport { AuthRoutes } from \"./auth.routes\"\r\nimport { LoginComponent } from './login.component';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { CoreModule } from '../core.module';\r\nimport { MaterialModule } from '@angular/material';\r\nimport { SharedModule } from '../shared/shared.module';\r\n\r\n@NgModule({\r\n\tdeclarations: [\r\n\t\tLoginComponent\r\n\t],\r\n\timports: [AuthRoutes, MaterialModule, SharedModule, CoreModule, ReactiveFormsModule],\r\n\tproviders: []\r\n})\r\nexport class AuthModule { }\r\n```\r\n\r\nI couldn't figure out whats wrong with my module. I have been loading this as lazy loading\r\n\r\n```\r\nimport { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { LoginComponent } from './auth/login.component';\r\nimport { AuthGuard } from './auth/auth.guard';\r\n\r\nconst routes: Routes = [\r\n\t{\r\n\t\tpath:'',\r\n\t\tredirectTo: '/login',\r\n\t\tpathMatch: 'full'\r\n\t},\r\n\t{\r\n\t\tpath:'login',\r\n\t\t//component: LoginComponent\r\n\t\tloadChildren: 'app/auth/auth.module#AuthModule',\r\n\t}\r\n];\r\nexport const RoutingModule = RouterModule.forRoot(routes, { useHash: true });\r\n```\r\nAngular cli : \"1.0.0-beta.19-3\",\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/260850450","html_url":"https://github.com/angular/angular-cli/issues/3141#issuecomment-260850450","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/3141","id":260850450,"user":{"login":"harilalinapp","id":12621519,"avatar_url":"https://avatars.githubusercontent.com/u/12621519?v=3","gravatar_id":"","url":"https://api.github.com/users/harilalinapp","html_url":"https://github.com/harilalinapp","followers_url":"https://api.github.com/users/harilalinapp/followers","following_url":"https://api.github.com/users/harilalinapp/following{/other_user}","gists_url":"https://api.github.com/users/harilalinapp/gists{/gist_id}","starred_url":"https://api.github.com/users/harilalinapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harilalinapp/subscriptions","organizations_url":"https://api.github.com/users/harilalinapp/orgs","repos_url":"https://api.github.com/users/harilalinapp/repos","events_url":"https://api.github.com/users/harilalinapp/events{/privacy}","received_events_url":"https://api.github.com/users/harilalinapp/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T04:20:48Z","updated_at":"2016-11-16T04:20:48Z","body":"Hi,\r\nIt's solved my issue and i can run the 'ng serve --aot' now .\r\nBut other error showed up on browser.\r\n\r\n```\r\nerror_handler.js:47 EXCEPTION: Uncaught (in promise): Error: Cannot find module 'app/auth/auth.module.ngfactory'.\r\nError: Cannot find module 'app/auth/auth.module.ngfactory'.\r\n    at webpackEmptyContext (http://localhost:4200/main.bundle.js:61294:8)\r\n    at SystemJsNgModuleLoader.loadFactory (http://localhost:4200/main.bundle.js:47921:40)\r\n    at SystemJsNgModuleLoader.load (http://localhost:4200/main.bundle.js:47902:35)\r\n    at RouterConfigLoader.loadModuleFactory (http://localhost:4200/main.bundle.js:10598:128)\r\n    at RouterConfigLoader.load (http://localhost:4200/main.bundle.js:10590:81)\r\n    at MergeMapSubscriber.project (http://localhost:4200/main.bundle.js:68460:111)\r\n    at MergeMapSubscriber._tryNext (http://localhost:4200/main.bundle.js:12799:27)\r\n    at MergeMapSubscriber._next (http://localhost:4200/main.bundle.js:12789:18)\r\n    at MergeMapSubscriber.Subscriber.next (http://localhost:4200/main.bundle.js:2131:18)\r\n    at ScalarObservable._subscribe (http://localhost:4200/main.bundle.js:59985:24)\r\n```\r\n\r\nI think it's not finding the lazy loaded module in AoT mode."}}
{"actor":{"display_login":"harilalinapp"}}