Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error encountered resolving symbol values statically. #38

Closed
kuncevic opened this issue Dec 12, 2016 · 13 comments
Closed

Error encountered resolving symbol values statically. #38

kuncevic opened this issue Dec 12, 2016 · 13 comments
Assignees
Labels
Milestone

Comments

@kuncevic
Copy link
Contributor

kuncevic commented Dec 12, 2016

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.

@kuncevic kuncevic changed the title Error encountered resolving symbol val es statically. Error encountered resolving symbol values statically. Dec 12, 2016
@nickraphael
Copy link

I am also experiencing this exact issue.

@ThomasBurleson ThomasBurleson added this to the v1.1.0-beta.1 milestone Dec 12, 2016
@ThomasBurleson ThomasBurleson self-assigned this Dec 12, 2016
@ThomasBurleson
Copy link
Contributor

I believe this is related to AOT compiler and exported Lambda(s): angular/angular#10789.

@ThomasBurleson
Copy link
Contributor

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

@kuncevic
Copy link
Contributor Author

kuncevic commented Dec 13, 2016

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.

@nickraphael
Copy link

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

@TylerDev6
Copy link

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

@TylerDev6
Copy link

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

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Dec 13, 2016

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

@kuncevic
Copy link
Contributor Author

kuncevic commented Dec 13, 2016

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

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Dec 14, 2016

Fixed with SHA 2a1590a + SHA 3f2aa21.

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

@kuncevic
Copy link
Contributor Author

kuncevic commented Dec 14, 2016

@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: 3f2aa21.

Is there still issues with the latest angular aot compiler?

@ThomasBurleson
Copy link
Contributor

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

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants