You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just updated to angular/compiler 2.2.4 and my ngc is no longer creating my application ngFactory files in the specified outGen folder. The last working version of angular/compiler on my stack was 2.1.2. I'm currently on node 6.9.1 and angular 2.2.4. You can check out my stack here and follow the instructions below to reproduce the process
Thanks in advance!
JT
I'm submitting a ... (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
initial angular/compiler compilation; app.module.ngFactory file not being created
Expected behavior
app.module.ngFactory file would be created along with component factories
Minimal reproduction of the problem with instructions
@laco0416 @actra-gschuster Swell link, mates! The issue is understandable. @ericmartinezr Angular 2.3.0 coupled with TS 2.0.10 is also throwing errors in my instance. Maybe 2.3.0 made progress towards TS 2.1 and lost 2.0 compatibility? In any case, thanks for all the help! I'll be sticking with ng2.2.4 for now.
Here's the error for reference: ng2.3.0 -> TS2.0.10
Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing
the function or lambda with a reference to an exported function, resolving symbol AppModule in
C:/.../.../.../.../.../GOAT-stack/app/app.module.ts, resolving symbol AppModule in C:/.../.../.../.../.../GOAT-
stack/app/app.module.ts
@JCThomas4214 That's not an issue with NG or TSC, it's just because you're not exporting the lambda function and thus NG is unable to resolve it statically.
E.g. instead of writing: let x: any = { abc: (foo: any) => foo.bar };
just write it as: export const callback = (foo: any) => foo.bar; let x: any = { abc: callback };
Activity
buu700 commentedon Dec 8, 2016
I ran into this as well, after upgrading from Angular 2.2.4 with TypeScript 2.0.10 to Angular 2.3.0 with TypeScript 2.1.4.
lacolaco commentedon Dec 8, 2016
I guess it's caused by TypeScript 2.1. @JCThomas4214 Could you ensure whether it will happen w/ TypeScript 2.0.10 too?
JCThomas4214 commentedon Dec 8, 2016
I just upped to 2.0.10 and it seems to be working now. Thanks @laco0416 ! Is it safe to assume this issue is cause typescript incompatibility?
lacolaco commentedon Dec 8, 2016
@JCThomas4214 maybe.
@chuckjaz @alexeagle could you handle this issue? TS 2.1 is current stable version.
lacolaco commentedon Dec 8, 2016
probably this issue is duplicated w/ #12966
actra-gschuster commentedon Dec 8, 2016
@JCThomas4214 Typescript changed several internals with upgrading to 2.1, see the linked issue #12966
ericmartinezr commentedon Dec 8, 2016
They're working on upgrading to ts2.1 #13294
JCThomas4214 commentedon Dec 8, 2016
@laco0416 @actra-gschuster Swell link, mates! The issue is understandable. @ericmartinezr Angular 2.3.0 coupled with TS 2.0.10 is also throwing errors in my instance. Maybe 2.3.0 made progress towards TS 2.1 and lost 2.0 compatibility? In any case, thanks for all the help! I'll be sticking with ng2.2.4 for now.
Here's the error for reference: ng2.3.0 -> TS2.0.10
actra-gschuster commentedon Dec 12, 2016
@JCThomas4214 That's not an issue with NG or TSC, it's just because you're not exporting the lambda function and thus NG is unable to resolve it statically.
E.g. instead of writing:
let x: any = { abc: (foo: any) => foo.bar };just write it as:
export const callback = (foo: any) => foo.bar; let x: any = { abc: callback };DzmitryShylovich commentedon Feb 4, 2017
@pkozlowski-opensource was fixed #13204 (comment)
can be closed
angular-automatic-lock-bot commentedon Sep 10, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.