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

FlexLayoutModule.forRoot() causing error in 2.0.0-beta.5 #175

Closed
HarkSolDev opened this issue Feb 10, 2017 · 7 comments · Fixed by #179
Closed

FlexLayoutModule.forRoot() causing error in 2.0.0-beta.5 #175

HarkSolDev opened this issue Feb 10, 2017 · 7 comments · Fixed by #179
Labels
bug build has pr A PR has been created to address this issue

Comments

@HarkSolDev
Copy link

HarkSolDev commented Feb 10, 2017

Just updated to the latest beta ( 2.0.0-beta.5 ) and my project is become very unhappy with the FlexLayoutModule.forRoot() in my angular modules definitions... . did I miss something?

Output:

ERROR in Error encountered resolving symbol values statically. 

Calling function 'FlexLayoutModule', function calls are not supported. 
Consider replacing the function or lambda with a reference to an exported function, 
resolving symbol SidenavModule in D:/[REDACTED]/sidenav/sidenav.module.ts,
resolving symbol SidenavModule in D:/[REDACTED]/src/app/modules/sidenav/sidenav.module.ts
@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Feb 10, 2017

@HarkSolDev - FlexLayoutModule.forRoot() was deprecated, but not removed. You should see a console.warn() message in the console. However your error ^ appears to be unrelated.

I would imagine you are using angular CLI ? Did you upgrade to @angular/cli Beta.30 or higher? That has upgrade issues with existing CLI projects; nothing to do with flex-layout.

Fresh projects (using @angular/CLI beta.30) work great with Flex-Layout Beta.5. Also this plunkr works without issues: http://plnkr.co/edit/QrDjtafk138RVrpS3KBD?p=preview

Closing as "not a flex-layout" issue.


General discussion and how-to questions should be posted to the community forum areas:

@HarkSolDev
Copy link
Author

Apologies.. your quite right.. Here's the link to a discussion in the angular CLI camp...
angular/angular-cli#4425

Thanks for the heads up !

@ThomasBurleson
Copy link
Contributor

@HarkSolDev - great link. Thx.

Solutions re the @angular-cli issue: angular/angular-cli#4425 (comment)

@cre8
Copy link

cre8 commented Feb 10, 2017

I got the same error with an older project version. Removing .forRoot() worked for me.

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Feb 10, 2017

Do you have the forRoot() method in your local flex-layout.umd.js file:

Here is the beta.5 version flex-layout.umd.js

The Beta.5 version contains the static forRoot() method; with an /** @deprecated */ comment.
So I am unclear why you are encountering your error(s).

@ThomasBurleson
Copy link
Contributor

ThomasBurleson added a commit that referenced this issue Feb 10, 2017
… ngc+aot

* 'forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
* clarify changes to FlexLayoutModule.forRoot()

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
ThomasBurleson added a commit that referenced this issue Feb 10, 2017
… ngc+aot

* 'forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
* clarify changes to FlexLayoutModule.forRoot()

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
ThomasBurleson added a commit that referenced this issue Feb 10, 2017
*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
@ThomasBurleson ThomasBurleson added the has pr A PR has been created to address this issue label Feb 10, 2017
ThomasBurleson added a commit that referenced this issue Feb 10, 2017
*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
tinayuangao pushed a commit that referenced this issue Feb 10, 2017
…179)

*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
karlhaas pushed a commit to karlhaas/flex-layout that referenced this issue May 3, 2017
…ngular#179)

*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes angular#174, Fixes angular#175, Fixes angular#176, Fixes angular#178.
@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
bug build has pr A PR has been created to address this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants