Skip to content

angular/compiler 2.2.4 compilation issue #13204

Closed

Description

@JCThomas4214

Hey guys,

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

What is the motivation / use case for changing the behavior?

cannot compile AoT

Please tell us about your environment:

MEAN stack

  • Angular version: 2.2.4

  • Browser: [all]

    • (not a dom issue)
  • Language: [TypeScript 2.1.1]

  • Node (for AoT issues): node --version = 6.9.1

Activity

  1. buu700 commented on Dec 8, 2016

    @buu700

    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.

  2. lacolaco commented on Dec 8, 2016

    @lacolaco
    Contributor

    I guess it's caused by TypeScript 2.1. @JCThomas4214 Could you ensure whether it will happen w/ TypeScript 2.0.10 too?

  3. JCThomas4214 commented on Dec 8, 2016

    @JCThomas4214
    Author

    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?

  4. lacolaco commented on Dec 8, 2016

    @lacolaco
    Contributor

    @JCThomas4214 maybe.

    @chuckjaz @alexeagle could you handle this issue? TS 2.1 is current stable version.

  5. lacolaco commented on Dec 8, 2016

    @lacolaco
    Contributor

    probably this issue is duplicated w/ #12966

  6. actra-gschuster commented on Dec 8, 2016

    @actra-gschuster

    @JCThomas4214 Typescript changed several internals with upgrading to 2.1, see the linked issue #12966

  7. ericmartinezr commented on Dec 8, 2016

    @ericmartinezr
    Contributor

    They're working on upgrading to ts2.1 #13294

  8. JCThomas4214 commented on Dec 8, 2016

    @JCThomas4214
    Author

    @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
    
  9. added
    area: build & ciRelated the build and CI infrastructure of the project
    on Dec 8, 2016
  10. actra-gschuster commented on Dec 12, 2016

    @actra-gschuster

    @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 };

  11. DzmitryShylovich commented on Feb 4, 2017

    @DzmitryShylovich
    Contributor
  12. angular-automatic-lock-bot commented on Sep 10, 2019

    @angular-automatic-lock-bot

    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.

  13. locked and limited conversation to collaborators on Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: build & ciRelated the build and CI infrastructure of the project

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions