-
Notifications
You must be signed in to change notification settings - Fork 192
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
ModuleWithProviders now takes a template arguments <T> in angular 10, #250
Comments
For reference, we also run it on our ngcc-validation repo while updating to v5.1.0: angular/ngcc-validation#1606 To add some more info on the Using To avoid the build error, you must pass a type argument to |
Same error after upgrading from
|
BTW, this |
Taking a closer look, this seems to be indeed caused by the fact that these ngcc artifacts are shipped to npm. More specifically, ngcc is normally able to fix the typings of a simplae function return Getting rid of the ngcc artifacts before publishing to npm should fix this. This comment explains how to fix the same issue in a different library and seems apply here as well. |
I can confirm: Deleting the ngcc artifacts from the node_modules/ngx-echarts folder fixes the issues. |
Hello. What steps should I follow in order to fix this issue? I have
Thanks. |
You need to remove all |
Returning to Version 5.0.0 has currently solved the issue for me... I guess we have to wait until a fix version for this is released, the other solution here come by too hacky for a production build. |
Probably the wrong ng-package.json file was used for publishing. There are two files:
The first one is exactly the one that can cause issue that @gkalpak is pointing to:
The latter file does not have this line. This is just an assumption... Normally I would already make a PR, but it's unclear what is the intention behind all this and whether there is something to fix at all. @xieziyu we need some of your precious time, please :) |
I had to downgrade my angular to 9.1.12 |
Can the type argument be added to the module instead? It has been depreciated since Angular 9 anyway https://angular.io/guide/migration-module-with-providers |
The problem is not the type. The problem is that the latest deployed version contains artifacts that it should not, which is turn prevents the Angular Compatibility Compiler from doing its work. See #250 (comment). |
Not tested but should resolve #250 See this for more info https://angular.io/guide/migration-module-with-providers
Date: 2020-07-23T22:01:56.605Z - Hash: 91eb1069bf5298af4ef2 - Time: 43029ms
ERROR in node_modules/ngx-echarts/lib/ngx-echarts.module.d.ts:4:47 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s).
4 static forRoot(config: NgxEchartsConfig): ModuleWithProviders;
https://v9.angular.io/api/core/ModuleWithProviders#providers
https://v10.angular.io/api/core/ModuleWithProviders#providers
The text was updated successfully, but these errors were encountered: