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

Bug? Deprecation of the .forRoot() #473

Closed
asaph26 opened this issue Mar 31, 2017 · 9 comments
Closed

Bug? Deprecation of the .forRoot() #473

asaph26 opened this issue Mar 31, 2017 · 9 comments
Labels

Comments

@asaph26
Copy link
Contributor

asaph26 commented Mar 31, 2017

While initialising the module using .forRoot() using the latest CLI in AOT it fails with

ERROR in Error encountered resolving symbol values statically. Calling function 'CovalentCoreModule', function calls are not supported.

Given that this will be deprecated in the upcoming beta.3, trying to use the nightly version with AOT causes the providers to not be initialised.

Note:

  1. I am trying to run this on Angular v4
  2. I had the same problem with material and had to go back to using .forRoot(). This did not cause any AOT compilation problems though
@asaph26
Copy link
Contributor Author

asaph26 commented Apr 1, 2017

This could be because of covalent being compiled using the @angular/compiler-cli v2.4.x

@jotatoledo
Copy link
Contributor

why are u trying to compile angular 4.x.x with compiler cli 2.4.x? For angular 4.x.x you need compiler cli 4.x.x

@jotatoledo
Copy link
Contributor

Btw, if you are using the current release version, there is no support for angular 4,x,x

@asaph26
Copy link
Contributor Author

asaph26 commented Apr 2, 2017

@jotatoledo I am aware that this project doesn't work with angular 4 yet. However as I mentioned, I am using the nightly version which has been patched for Angular 4 support (#429) despite being compiled using the 2.4.x compiler. Adding some more details to add context

I was able to get this working in JIT mode with the .forRoot() method which failed in the AOT mode. I was able to compile using AOT after removal of the .forRoot method but then it started complaining that some service wasn't provided

The background is that the forRoot method during bootstrap was deprecated to be removed and every service that needed to be a singleton service was provided as a singleton service without the need for the forRoot method. So I found it a little confusing when it says there is no provider found. (Check #389)

So this is basically a ticket to say that I am not sure if there is a bug or not, but seems like something is not the way it should be.

@jotatoledo
Copy link
Contributor

@asaph26 my bad, missed the part on ur comment where u mentioned the use of the nighly version

@emoralesb05
Copy link
Contributor

Which services werent provided in the error? We stopped using forRoot in the docs a while back and works fine. So im trying to see if we missed something.

@emoralesb05
Copy link
Contributor

Found the issue with for forRoot AoT error. #477

@emoralesb05 emoralesb05 added the bug label Apr 2, 2017
@emoralesb05
Copy link
Contributor

@asaph26 this should be fixed between #477 and #476. Can you confirm?

I am upgrading the quickstart and not seeing issues anymore.

@asaph26
Copy link
Contributor Author

asaph26 commented Apr 3, 2017

This is resolved now. Thanks @emoralesb05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants