-
Notifications
You must be signed in to change notification settings - Fork 12k
In latest angular-cli: 1.0.0-beta.22 getting exceptions.... #3384
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
Comments
Almost certainly due to AOT. See #3354 |
Try extracting the lambda into a separate function for the provider factory. |
tried this with same results:
anyway to disable AOT for now so I can focus on hrm testing? |
this is the error:
|
@born2net ran into the same issue trying to get @ngrx/store working. This fixed it for me: ngrx/store#190 (comment) |
@beeman Is there a way to make dev tools and store log monitor work with AOT? Thanks |
I tried to modify my code as follows with no luck:
any ideas? regards Sean |
@born2net have you tried making the var "fac" into an untyped funciont rathar than a var .... eg
that might work |
I haven't gotten that far to trying and getting the dev tools work... |
ya same error:
|
actually that fixed it!!!! tx!!!!!!!!!!
|
and no, dev tools is not working :( |
the issue seems to be that while it is compiling now, it's not running my fac function
|
@beeman |
maybe try changing useFactory: fac => useFactory: fac() just a thought as you are not actually running the function. |
so I did that with no luck. |
I figured that one out, --aot false
I was able to fix the factory, but more issues with same error, so I am just going to wait until .22 gets to npm so its stable enough |
If you aren't specifying BUT, we are still using the AotPlugin to figure out the lazy loaded routes from your app. The problem is that (it seems) Look for a I'm going to investigate this further and come back to you. |
so some more updates, I went ahead and updated all the libs again and latest cli .22 again.
but if I do include it, ng-cli will hang on compilation:
When I switch back to ng-cli .21, all is well, so I have somewhat confidence something broke in .22 and so regards Sean. |
Okay I cloned your repo and checked out the Putting back the Closing this as working as intended. |
ok but let just make sure we are on the same page. |
We don't use static analysis in .21 to get your lazy routes, and because of that we were missing some routes. Both options have pros and cons, but we will not move back to reading your TS. External dependencies can define lazy routes and we were missing those. I just checked and didn't know it was your library. In order to build If you need further help, let us know. |
BTW, it doesn't hang locally. You might have something wrong in your node_modules. |
ok but I don't use lazy loading... so to recap, I want to be able to use .22 and uncomment the line of: tx again, Angular 2 Kitchen sink: http://ng2.javascriptninja.io Sean |
and you mean to run |
Sorry, more info here (it's actually That should cover questions you have about the process. Cheers! |
And yes, I mean you need to generate |
It's our best practices and our recommended way to publish Angular component libraries to also publish |
perfect tx |
didn't have much luck with ngc.
and still same issue with latest .22-1 hangs at 20% root@DESKTOP-VEUHFOL /cygdrive/c/msweb/msbarcode |
Problem seems to have disappeared in beta 24 ... |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
In latest angular-cli: 1.0.0-beta.22 getting exceptions....
As you can see I have a simple providing array which causes the problem (works fine in ng cli beta .21)
so ng cli is not happy about the fact I am running a factory with functions (which is the proper way of setting up Redux). If I remove the entire providing function, .22 passes the ng serve, but again, have to do it in order to bootstrap Redux.
You can take a look at the very small project at:
https://github.com/born2net/msbarcode/tree/hmr
will be happy to help test as I'd like to get hmr running which requires .22.
regards,
Sean
The text was updated successfully, but these errors were encountered: