Error trying to update to angular 13 Can't resolve all parameters for FilterService: (?).

4 Answers 334 Views
General Discussions Grid
Daniela
Top achievements
Rank 1
Daniela asked on 09 Feb 2022, 04:18 AM

I'm trying to update a project to Angular 13 and after running the tests I end up with this error, has anyone faced this error? and know how to solve it?

I'm using Jest as test runner and jest-preset-angular updated to the last version

NG0204: Can't resolve all parameters for FilterService: (?).

      at getUndecoratedInjectableFactory (node_modules/@angular/core/fesm2015/core.mjs:11501:15)
      at injectableDefOrInjectorDefFactory (node_modules/@angular/core/fesm2015/core.mjs:11491:16)
      at providerToFactory (node_modules/@angular/core/fesm2015/core.mjs:11534:52)
      at providerToRecord (node_modules/@angular/core/fesm2015/core.mjs:11521:25)
      at R3Injector.processProvider (node_modules/@angular/core/fesm2015/core.mjs:11424:24)
      at node_modules/@angular/core/fesm2015/core.mjs:11410:56
      at node_modules/@angular/core/fesm2015/core.mjs:4162:76
          at Array.forEach (<anonymous>)
      at deepForEach (node_modules/@angular/core/fesm2015/core.mjs:4162:11)
      at R3Injector.processInjectorType (node_modules/@angular/core/fesm2015/core.mjs:11410:13)
      at node_modules/@angular/core/fesm2015/core.mjs:11213:48
      at node_modules/@angular/core/fesm2015/core.mjs:4162:76
          at Array.forEach (<anonymous>)
      at deepForEach (node_modules/@angular/core/fesm2015/core.mjs:4162:11)
      at new R3Injector (node_modules/@angular/core/fesm2015/core.mjs:11213:9)
      at createInjectorWithoutInjectorInstances (node_modules/@angular/core/fesm2015/core.mjs:11187:12)
      at new NgModuleRef (node_modules/@angular/core/fesm2015/core.mjs:21812:28)
      at R3TestBedCompiler.finalize (node_modules/@angular/core/fesm2015/testing.mjs:930:30)
      at TestBedRender3.get testModuleRef [as testModuleRef] (node_modules/@angular/core/fesm2015/testing.mjs:1795:49)
      at TestBedRender3.inject (node_modules/@angular/core/fesm2015/testing.mjs:1718:29)
      at inject (node_modules/@angular/core/fesm2015/testing.mjs:1609:37)
      at node_modules/@testing-library/angular/fesm2015/testing-library-angular.mjs:157:15
      at node_modules/tslib/tslib.js:117:75
      at new ZoneAwarePromise (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1347:33)
      at __awaiter (node_modules/tslib/tslib.js:113:16)
      at createComponent (node_modules/@testing-library/angular/fesm2015/testing-library-angular.mjs:155:12)
      at node_modules/@testing-library/angular/fesm2015/testing-library-angular.mjs:126:33
      at node_modules/tslib/tslib.js:117:75
      at new ZoneAwarePromise (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1347:33)
      at __awaiter (node_modules/tslib/tslib.js:113:16)
      at renderFixture (node_modules/@testing-library/angular/fesm2015/testing-library-angular.mjs:122:20)
      at node_modules/@testing-library/angular/fesm2015/testing-library-angular.mjs:64:15
      at fulfilled (node_modules/tslib/tslib.js:114:62)
      at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:407:30)
      at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvoke (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:3765:43)
      at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:406:56)
      at Zone.Object.<anonymous>.Zone.run (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:167:47)
      at node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1325:38
      at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invokeTask (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:441:35)
      at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvokeTask (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:3796:43)
      at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invokeTask (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:440:64)
      at Zone.Object.<anonymous>.Zone.runTask (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:212:51)
      at drainMicroTaskQueue (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:627:39)

4 Answers, 1 is accepted

Sort by
0
Yanmario
Telerik team
answered on 11 Feb 2022, 01:07 PM

Hi Daniela,

An answer will be provided in the private support ticket id: 1553341 as it may require additional information like a runnable project.

I will also provide for public knowledge the following information:

Checking the following migration guide and following the steps- https://thymikee.github.io/jest-preset-angular/docs/guides/angular-13+/

As the ES Modules are new and might encounter some issues:

https://thymikee.github.io/jest-preset-angular/docs/guides/angular-13+/#using-es-modules

I hope the information is helpful for other forum users.

Regards,
Yanmario
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Cyril
Top achievements
Rank 1
Iron
answered on 16 Feb 2022, 03:38 PM
Hello, I am also facing the same issue. Was the solution found for this issue?
0
Cyril
Top achievements
Rank 1
Iron
answered on 17 Feb 2022, 02:28 PM | edited on 17 Feb 2022, 02:32 PM
Yanmario
Telerik team
commented on 21 Feb 2022, 02:05 PM | edited

Hi Cyril,

It's recommended to follow the migration guide provided in the answer:

https://thymikee.github.io/jest-preset-angular/docs/guides/angular-13+/

If there is still an error after the migration, could you provide us with a runnable project and reproduction steps. That will help investigate the issue and provide further help. Thank you in advance for your cooperation.

As for the provided issue, we would need some additional time to look into it and see if it's related to the issue from this post.

Regards,
Yanmario
Progress Telerik
Volker
Top achievements
Rank 1
commented on 21 Feb 2022, 05:12 PM

Same issue here, submitted as ticket 1554758, repro at https://github.com/vbraun/jest-preset-angular/tree/kendo-grid-error

It might be related to the namespace import issue, but its not us that is doing the namespaced import. If that is the cause then the namespaced import is somewhere in kendo ui, and we can't work around it from the outside.

0
Yanmario
Telerik team
answered on 22 Feb 2022, 01:28 PM

Hi Everyone,

We released a developer version with a fix to the described FilterService issue:

https://www.npmjs.com/package/@progress/kendo-angular-grid/v/6.0.4-dev.202202221309

The development build can be obtained following this documentation article:

https://www.telerik.com/kendo-angular-ui/components/installation/development-builds/

Thank you for the feedback and let us know how it goes for you.

Regards,
Yanmario
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Daniela
Top achievements
Rank 1
commented on 01 Mar 2022, 06:41 PM

Hi Yanmario, It's still happening to me; I created this runnable project https://github.com/danisanchezag/jest-error-grid to reproduce the error

 

Yanmario
Telerik team
commented on 02 Mar 2022, 08:11 AM

Hi Daniel,

The developer team reached to the conclusion that the Jest preset isn't working with Angular v13 without the Ivy packages. The team is currently working on switching to the Ivy library format expected to release in R2 May 2022. The progression can be followed in the following thread in our GitHub repository:

https://github.com/telerik/kendo-angular/issues/3502

The developers also tested with Angular v12 and the issue isn't present there.

Repository with the example:

https://github.com/tsvetomir/jest-preset-angular/tree/main/examples/example-app-v12

To sum up, when the Kendo UI for Angular library switches to the Ivy library, the issue would be resolved.

Regards,
Yanmario
Progress Telerik
Tags
General Discussions Grid
Asked by
Daniela
Top achievements
Rank 1
Answers by
Yanmario
Telerik team
Cyril
Top achievements
Rank 1
Iron
Share this question
or