{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/20639","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/20639/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/20639/comments","events_url":"https://api.github.com/repos/angular/angular/issues/20639/events","html_url":"https://github.com/angular/angular/issues/20639","id":276977010,"number":20639,"title":"JitCompilerFactory Bug at Angular 5","user":{"login":"jackzard","id":16070875,"avatar_url":"https://avatars2.githubusercontent.com/u/16070875?v=4","gravatar_id":"","url":"https://api.github.com/users/jackzard","html_url":"https://github.com/jackzard","followers_url":"https://api.github.com/users/jackzard/followers","following_url":"https://api.github.com/users/jackzard/following{/other_user}","gists_url":"https://api.github.com/users/jackzard/gists{/gist_id}","starred_url":"https://api.github.com/users/jackzard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackzard/subscriptions","organizations_url":"https://api.github.com/users/jackzard/orgs","repos_url":"https://api.github.com/users/jackzard/repos","events_url":"https://api.github.com/users/jackzard/events{/privacy}","received_events_url":"https://api.github.com/users/jackzard/received_events","type":"User","site_admin":false},"labels":[{"id":375501288,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20core%20&%20compiler","name":"comp: core & compiler","color":"c7def8","default":false}],"state":"closed","locked":false,"assignee":{"login":"ocombe","id":265378,"avatar_url":"https://avatars0.githubusercontent.com/u/265378?v=4","gravatar_id":"","url":"https://api.github.com/users/ocombe","html_url":"https://github.com/ocombe","followers_url":"https://api.github.com/users/ocombe/followers","following_url":"https://api.github.com/users/ocombe/following{/other_user}","gists_url":"https://api.github.com/users/ocombe/gists{/gist_id}","starred_url":"https://api.github.com/users/ocombe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocombe/subscriptions","organizations_url":"https://api.github.com/users/ocombe/orgs","repos_url":"https://api.github.com/users/ocombe/repos","events_url":"https://api.github.com/users/ocombe/events{/privacy}","received_events_url":"https://api.github.com/users/ocombe/received_events","type":"User","site_admin":false},"assignees":[{"login":"ocombe","id":265378,"avatar_url":"https://avatars0.githubusercontent.com/u/265378?v=4","gravatar_id":"","url":"https://api.github.com/users/ocombe","html_url":"https://github.com/ocombe","followers_url":"https://api.github.com/users/ocombe/followers","following_url":"https://api.github.com/users/ocombe/following{/other_user}","gists_url":"https://api.github.com/users/ocombe/gists{/gist_id}","starred_url":"https://api.github.com/users/ocombe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocombe/subscriptions","organizations_url":"https://api.github.com/users/ocombe/orgs","repos_url":"https://api.github.com/users/ocombe/repos","events_url":"https://api.github.com/users/ocombe/events{/privacy}","received_events_url":"https://api.github.com/users/ocombe/received_events","type":"User","site_admin":false}],"milestone":null,"comments":18,"created_at":"2017-11-27T10:58:01Z","updated_at":"2017-11-30T20:16:00Z","closed_at":"2017-11-28T23:37:16Z","author_association":"NONE","body":"\r\n## I'm submitting a...\r\n<!-- Check one of the following options with \"x\" -->\r\n<pre><code>\r\n[ ] Regression (a behavior that used to work and stopped working in a new release)\r\n[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->\r\n[ ] Feature request\r\n[ ] Documentation issue or request\r\n[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n</code></pre>\r\n\r\n## Current behavior\r\n<!-- Describe how the issue manifests. -->\r\nJitCompilerFactory already exported to public api from this https://github.com/angular/angular/pull/20478\r\n\r\nbut when i install Angular 5 then start using it got some error in production\r\n\r\nmy code \r\n`\r\nexport function compilerFactory() {\r\n\treturn new JitCompilerFactory([{useJit:true}]).createCompiler()\r\n}\r\n`\r\n\r\n`ERROR in src/app/app.module.ts(11,9): error TS2554: Expected 0 arguments, but got 1.\r\nsrc/app/dynamic/dynamic.component.ts(17,8): error TS2339: Property 'component' does not exist on type 'DynamicComponent'.\r\n`\r\n\r\nit seems JitCompilerFactory no need arguments, then i tried without arguments\r\n\r\n`\r\nexport function compilerFactory() {\r\n\treturn new JitCompilerFactory().createCompiler()\r\n}\r\n`\r\n\r\nthen i got new error\r\n\r\n`ERROR TypeError: Cannot read property 'useJit' of undefined`\r\n\r\ni tried manually edit `compiler_factory.d.ts` \r\n\r\n`\r\nexport declare class JitCompilerFactory implements CompilerFactory {\r\n    private _defaultOptions;\r\n    constructor(options: CompilerOptions[]) <<< i add this constructor\r\n    createCompiler(options?: CompilerOptions[]): Compiler;\r\n}\r\n`\r\n\r\nafter that im trying compile again but got new error :\r\n\r\n`Uncaught (in promise): Error: Unexpected value 't' imported by the module 'function (){}'. Please add a @NgModule annotation.`\r\n\r\n## Expected behavior\r\n<!-- Describe what the desired behavior would be. -->\r\nhow to fix this, Thanks\r\n\r\n@ocombe \r\n\r\n## Minimal reproduction of the problem with instructions\r\n<!--\r\nFor bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via\r\nhttps://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).\r\n-->\r\n\r\nhttps://github.com/jackzard/Angular5JitCompilerFactory\r\n\r\n## Environment\r\n\r\n<pre><code>\r\nAngular version: 5.1.0-beta.2\r\n<!-- Check whether this is still an issue in the most recent Angular version -->\r\n\r\nFor Tooling issues:\r\n- Node version: 8.9  <!-- run `node --version` -->\r\n- Platform:  Mac <!-- Mac, Linux, Windows -->\r\n\r\nOthers:\r\n<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->\r\n</code></pre>\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/348308181","html_url":"https://github.com/angular/angular/issues/20639#issuecomment-348308181","issue_url":"https://api.github.com/repos/angular/angular/issues/20639","id":348308181,"user":{"login":"Torqode","id":25185577,"avatar_url":"https://avatars0.githubusercontent.com/u/25185577?v=4","gravatar_id":"","url":"https://api.github.com/users/Torqode","html_url":"https://github.com/Torqode","followers_url":"https://api.github.com/users/Torqode/followers","following_url":"https://api.github.com/users/Torqode/following{/other_user}","gists_url":"https://api.github.com/users/Torqode/gists{/gist_id}","starred_url":"https://api.github.com/users/Torqode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Torqode/subscriptions","organizations_url":"https://api.github.com/users/Torqode/orgs","repos_url":"https://api.github.com/users/Torqode/repos","events_url":"https://api.github.com/users/Torqode/events{/privacy}","received_events_url":"https://api.github.com/users/Torqode/received_events","type":"User","site_admin":false},"created_at":"2017-11-30T20:16:00Z","updated_at":"2017-11-30T20:16:00Z","author_association":"NONE","body":"@claygifford This works with webpack+JIT, but when I use webpack+AOT I get this error:\r\n\r\n>ModuleNotFoundError: Module not found: Error: Can't resolve '@angular/compiler/src/config' in 'c:\\project\\src\\app\\lazymodule'\r\n   <...stack data omitted for brevity...>\r\nresolve '@angular/compiler/src/config' in 'c:\\project\\src\\app\\lazymodule'\r\n  Parsed request is a module\r\n  using description file: c:\\project\\package.json (relative path: ./src/app/lazymodule)\r\n    Field 'browser' doesn't contain a valid alias configuration\r\n  after using description file: c:\\project\\package.json (relative path: ./src/app/lazymodule)\r\n    resolve as module\r\n      looking for modules in c:\\project\\node_modules\r\n        using description file: c:\\project\\package.json (relative path: ./node_modules)\r\n          Field 'browser' doesn't contain a valid alias configuration\r\n        after using description file: c:\\project\\package.json (relative path: ./node_modules)\r\n          using description file: c:\\project\\node_modules\\@angular\\compiler\\package.json (relative path: ./src/config)\r\n            no extension\r\n              Field 'browser' doesn't contain a valid alias configuration\r\n              c:\\project\\node_modules\\@angular\\compiler\\src\\config doesn't exist\r\n            .ts\r\n              Field 'browser' doesn't contain a valid alias configuration\r\n              c:\\project\\node_modules\\@angular\\compiler\\src\\config.ts doesn't exist\r\n            .js\r\n              Field 'browser' doesn't contain a valid alias configuration\r\n              c:\\project\\node_modules\\@angular\\compiler\\src\\config.js doesn't exist\r\n            .json\r\n              Field 'browser' doesn't contain a valid alias configuration\r\n              c:\\project\\node_modules\\@angular\\compiler\\src\\config.json doesn't exist\r\n            as directory\r\n              c:\\project\\node_modules\\@angular\\compiler\\src\\config doesn't exist\r\netc, etc, repeated multiple times"}}
{"actor":{"display_login":"Torqode"}}