Please provide us with the following information:
Windows 7
@angular/cli: 1.0.0-rc.0
node: 6.9.4
os: win32 x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
ng build --prod
ERROR in Error encountered resolving symbol values statically. Reference to a local (non-exported) symbol 'VarName'...
I have an application that has a dynamic template 'determined' at runtime and by various factors. The possibilities are infinite to hard-code them. Before i upgraded the cli - my prod build would just work fine. It appears that the current version performs some static code validation/analysis for AOT compliance and hence is breaking it.
I am not planning to run this particular app in AOT since the template cannot be determined at runtime.
I would need a way to disable static analysis during build so I would be able to achieve the desired result.
Appreciate your input on this.
Thanks! We'll be in touch soon.
@nmorado, as @mattdistefano linked, if you are looking to disable AoT, use the following command:
ng build --prod --no-aot
This should get you a production build with JIT compilation.
Hi,
Just commented in #4904 (https://github.com/angular/angular-cli/issues/4904#issuecomment-286353381)
With ng build --prod --no-aot it still builds with aot and complains about lambda function.
Any thing I might be missing? thanks :)
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._
Most helpful comment
Hi,
Just commented in #4904 (https://github.com/angular/angular-cli/issues/4904#issuecomment-286353381)
With
ng build --prod --no-aotit still builds with aot and complains about lambda function.Any thing I might be missing? thanks :)