Flex-layout: Error encountered resolving symbol values statically.

Created on 12 Dec 2016  路  13Comments  路  Source: angular/flex-layout

Getting an error when using the library in my project. Just running ng build and getting an error:

c:\Project>ng build
 10% building modules 2/2 modules 0 activeError encountered resolving symbol val
ues statically. Function calls are not supported. Consider replacing the functio
n or lambda with a reference to an exported function, resolving symbol AppModule
 in c:/Project/src/app/app.module.ts, resolving symbol AppM
odule in c:/Project/src/app/app.module.ts
Error: 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:/Project
/src/app/app.module.ts, resolving symbol AppModule in c:/Project/src/app/app.module.ts
    at simplifyInContext (c:\Project\node_modules\@angular\
compiler-cli\src\static_reflector.js:475:23)
    at StaticReflector.simplify (c:\Project\node_modules\@a
ngular\compiler-cli\src\static_reflector.js:478:22)
    at StaticReflector.annotations (c:\Project\node_modules
\@angular\compiler-cli\src\static_reflector.js:60:36)
    at AotPlugin.getNgModuleMetadata (c:\Project\node_modul
es\@ngtools\webpack\src\plugin.js:330:41)
    at AotPlugin._processNgModule (c:\Project\node_modules\
@ngtools\webpack\src\plugin.js:271:42)
    at c:\Project\node_modules\@ngtools\webpack\src\plugin.
js:242:39
    at process._tickCallback (internal/process/next_tick.js:103:7)

I can pass the build if just put a comment on FlexLayoutModule.forRoot()

Angular 2.2.3
node 6.9.2
npm 4.0.3
Windows 7 Pro x64

UPDATE 0:
I was being producing the lib using both gulp build:components and gulp build:release but still has the same outcome once I put it it in my project.
UPDATE 1:
I can see you are relying on Anglar "^2.2.4" which is my project is relying on version 2.2.3 is there anyting in 2.2.4 that you rely on, which is not in 2.2.3 ?
UPDATE 2:
Just updated the project to angular 2.2.4 but didn't help.

build

All 13 comments

I am also experiencing this exact issue.

I believe this is related to AOT compiler and exported Lambda(s): https://github.com/angular/angular/issues/10789.

@kuncevic, @nickraphael - please retry with the latest from master. I will reopen if that does resolve your issue.

Ahh seams to be still not working.
Here is the steps to reproduce:
1)gulp build:components
2)ng new project
3)bring the flex-layout output dir in to the node_modules under @anglar dir
4)import { AppComponent } from './app.component'; and FlexLayoutModule.forRoot() in to imports
5)ng serve getting stuck on 20%, ng build giving the same error

I am using angular-cli: 1.0.0-beta.22-1 and all the rest system params as above.

It works on my system at home but not at work. One potential reason could be the angular2 cli. At home I'm using 19-3, but at work it's 22-1

having the same issue as @nickraphael and @kuncevic with the same angular-cli version

@ThomasBurleson seems latest issue is surrounding calling methods in @Directive decorator "addResponsiveAliases"

@TylerDev6 - thank you. I just added a fix [to your note] to HEAD.

Still working on gulp build:release issues with unknown compiler-cli errors.

@ThomasBurleson I just pull the updates but still having same issue.
Did you try that with a latest cli on your side?

Fixed with SHA 2a1590a30063a58734951f67f3f6c4bbe71090d7 + SHA 3f2aa2167efc741f8eab27d8198b17f54a22c21d.

Note: gulp build:lib and gulp build:release are now used.

After gulp build:release, if you copy the dir from /dist/@angular/flex-layout and paste into your node_modules/@angular/ directory, you should be able to use the Flex Layout API with the Angular CLI ng serve.

screen shot 2016-12-13 at 6 30 39 pm

screen shot 2016-12-13 at 6 33 10 pm

@ThomasBurleson It is seams to be working now. Thanks for fixig this.

I see you downgraded pretty mutch all angular related packages from 2.3 to 2.2.4 exept zone.js which you updated to most recent one as per that commit: https://github.com/angular/flex-layout/commit/3f2aa2167efc741f8eab27d8198b17f54a22c21d.

Is there still issues with the latest angular aot compiler?

@kuncevic - Thx for keeping us straight here: see #45

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WilhelmOlejnik picture WilhelmOlejnik  路  4Comments

intellix picture intellix  路  4Comments

manuelbachl picture manuelbachl  路  5Comments

JadedEric picture JadedEric  路  4Comments

mackelito picture mackelito  路  3Comments