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] Fix 6 test tasks that fail after migrating to pnpm #2776

Closed
3 tasks done
tschaffter opened this issue Aug 27, 2024 · 3 comments
Closed
3 tasks done

[Bug] Fix 6 test tasks that fail after migrating to pnpm #2776

tschaffter opened this issue Aug 27, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@tschaffter
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

What product(s) are you seeing the problem on?

No response

Current behavior

List of projects with a test task that fail:

  • nx run openchallenges-ui:test
  • nx run openchallenges-not-found:test
  • nx run openchallenges-about:test
  • nx run openchallenges-home:test
  • nx run model-ad-not-found:test
  • ...and 1 more...

Expected behavior

No response

Anything else?

No response

Commit ID

No response

Are you developing inside the dev container?

  • I am using the dev container

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tschaffter tschaffter added the bug Something isn't working label Aug 27, 2024
@tschaffter tschaffter self-assigned this Aug 27, 2024
@tschaffter
Copy link
Member Author

tschaffter commented Aug 27, 2024

Issue 1

nx run openchallenges-ui:test

Error:

...
      at VirtualConsole.<anonymous> (../../../node_modules/.pnpm/jest-environment-jsdom@29.4.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jest-environment-jsdom/build/index.js:60:23)
      at exports.createStylesheet (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js:38:63)
      at HTMLStyleElementImpl._updateAStyleBlock (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js:68:5)
      at HTMLStyleElementImpl._attach (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js:19:12)
      at HTMLHeadElementImpl._insert (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:835:14)
      at HTMLHeadElementImpl._preInsert (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:756:10)
      at HTMLHeadElementImpl._append (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:862:17)
      at HTMLHeadElementImpl.appendChild (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:598:17)
      at HTMLHeadElement.appendChild (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/generated/Node.js:411:60)
      at _SharedStylesHost.getStyleElement (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:358:18)
      at _SharedStylesHost.addStyleToHost (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:363:30)
      at _SharedStylesHost.onStyleAdded (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:305:18)
      at _SharedStylesHost.addStyles (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:268:22)
      at NoneEncapsulationDomRenderer.applyStyles (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:742:31)
      at _DomRendererFactory2.createRenderer (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:465:22)
      at addComponentLogic (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12464:133)
      at instantiateAllDirectives (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12255:9)
      at createDirectivesInstances (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:11660:5)
      at ɵɵelementStart (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:24361:9)
      at _MultiSelect_Template (../../../ng:/_MultiSelect/ɵcmp.js:1142:9)
      at executeTemplate (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:11620:9)
      at renderView (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12827:13)
      at renderComponent (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12773:5)
      at renderChildComponents (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12875:9)
      at renderView (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12855:13)
      at renderComponent (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12773:5)
      at renderChildComponents (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12875:9)
      at renderView (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12855:13)
      at ComponentFactory.create (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:17092:17)
      at initComponent (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/testing.mjs:1976:51)
      at _ZoneDelegate.Object.<anonymous>._ZoneDelegate.invoke (../../../node_modules/.pnpm/zone.js@0.14.4/node_modules/zone.js/bundles/zone.umd.js:411:30)
      at Object.onInvoke (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:16120:33)
      at _ZoneDelegate.Object.<anonymous>._ZoneDelegate.invoke (../../../node_modules/.pnpm/zone.js@0.14.4/node_modules/zone.js/bundles/zone.umd.js:410:56)
      at Zone.Object.<anonymous>.Zone.run (../../../node_modules/.pnpm/zone.js@0.14.4/node_modules/zone.js/bundles/zone.umd.js:166:47)
      at NgZone.run (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:15981:28)
      at _TestBedImpl.createComponent (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/testing.mjs:1988:41)
      at Function.createComponent (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/testing.mjs:1779:37)
      at src/lib/search-dropdown-filter/search-dropdown-filter.component.spec.ts:14:23

 PASS   openchallenges-ui  libs/openchallenges/ui/src/lib/paginator/paginator.component.spec.ts
  ● Console

    console.error
      Error: Could not parse CSS stylesheet
          at exports.createStylesheet (/workspaces/sage-monorepo/node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js:34:21)
          at HTMLStyleElementImpl._updateAStyleBlock (/workspaces/sage-monorepo/node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js:68:5)
          at HTMLStyleElementImpl._attach (/workspaces/sage-monorepo/node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js:19:12)
          at HTMLHeadElementImpl._insert (/workspaces/sage-monorepo/node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:835:14)
          at HTMLHeadElementImpl._preInsert (/workspaces/sage-monorepo/node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:756:10)
          at HTMLHeadElementImpl._append (/workspaces/sage-monorepo/node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:862:17)
          at HTMLHeadElementImpl.appendChild (/workspaces/sage-monorepo/node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:598:17)
          at HTMLHeadElement.appendChild (/workspaces/sage-monorepo/node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/generated/Node.js:411:60)
          at _SharedStylesHost.getStyleElement (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:358:18)
          at _SharedStylesHost.addStyleToHost (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:363:30)
          at _SharedStylesHost.onStyleAdded (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:305:18)
          at _SharedStylesHost.addStyles (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:268:22)
          at NoneEncapsulationDomRenderer.applyStyles (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:742:31)
          at _DomRendererFactory2.createRenderer (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:465:22)
          at addComponentLogic (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12464:133)
          at instantiateAllDirectives (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12255:9)
          at createDirectivesInstances (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:11660:5)
          at ɵɵelementStart (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:24361:9)
          at PaginatorComponent_Template (ng:///PaginatorComponent.js:21:9)
          at executeTemplate (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:11620:9)
          at renderView (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12827:13)
          at renderComponent (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12773:5)
          at renderChildComponents (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12875:9)
          at renderView (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12855:13)
          at ComponentFactory.create (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:17092:17)
          at initComponent (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/testing.mjs:1976:51)
          at _ZoneDelegate.Object.<anonymous>._ZoneDelegate.invoke (/workspaces/sage-monorepo/node_modules/.pnpm/zone.js@0.14.4/node_modules/zone.js/bundles/zone.umd.js:411:30)
          at Object.onInvoke (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:16120:33)
          at _ZoneDelegate.Object.<anonymous>._ZoneDelegate.invoke (/workspaces/sage-monorepo/node_modules/.pnpm/zone.js@0.14.4/node_modules/zone.js/bundles/zone.umd.js:410:56)
          at Zone.Object.<anonymous>.Zone.run (/workspaces/sage-monorepo/node_modules/.pnpm/zone.js@0.14.4/node_modules/zone.js/bundles/zone.umd.js:166:47)
          at NgZone.run (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:15981:28)
          at _TestBedImpl.createComponent (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/testing.mjs:1988:41)
          at Function.createComponent (/workspaces/sage-monorepo/node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/testing.mjs:1779:37)
          at /workspaces/sage-monorepo/libs/openchallenges/ui/src/lib/paginator/paginator.component.spec.ts:14:23
          at processTicksAndRejections (node:internal/process/task_queues:95:5) {
        detail: '@layer primeng{.p-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.p-paginator-left-content{margin-right:auto}.p-paginator-right-content{margin-left:auto}.p-paginator-page,.p-paginator-next,.p-paginator-last,.p-paginator-first,.p-paginator-prev,.p-paginator-current{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative}.p-paginator-element:focus{z-index:1;position:relative}}\n',
        type: 'css parsing'
      }

      at VirtualConsole.<anonymous> (../../../node_modules/.pnpm/jest-environment-jsdom@29.4.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jest-environment-jsdom/build/index.js:60:23)
      at exports.createStylesheet (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js:38:63)
      at HTMLStyleElementImpl._updateAStyleBlock (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js:68:5)
      at HTMLStyleElementImpl._attach (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js:19:12)
      at HTMLHeadElementImpl._insert (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:835:14)
      at HTMLHeadElementImpl._preInsert (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:756:10)
      at HTMLHeadElementImpl._append (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:862:17)
      at HTMLHeadElementImpl.appendChild (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:598:17)
      at HTMLHeadElement.appendChild (../../../node_modules/.pnpm/jsdom@20.0.3_canvas@2.10.2_encoding@0.1.13_/node_modules/jsdom/lib/jsdom/living/generated/Node.js:411:60)
      at _SharedStylesHost.getStyleElement (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:358:18)
      at _SharedStylesHost.addStyleToHost (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:363:30)
      at _SharedStylesHost.onStyleAdded (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:305:18)
      at _SharedStylesHost.addStyles (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:268:22)
      at NoneEncapsulationDomRenderer.applyStyles (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:742:31)
      at _DomRendererFactory2.createRenderer (../../../node_modules/.pnpm/@angular+platform-browser@18.0.7_@angular+animations@18.0.7_@angular+core@18.0.7_rxjs@7.8.1_z_7knaxgc3qvmy364d5qzwfakyya/node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs:465:22)
      at addComponentLogic (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12464:133)
      at instantiateAllDirectives (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12255:9)
      at createDirectivesInstances (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:11660:5)
      at ɵɵelementStart (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:24361:9)
      at PaginatorComponent_Template (../../../ng:/PaginatorComponent.js:21:9)
      at executeTemplate (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:11620:9)
      at renderView (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12827:13)
      at renderComponent (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12773:5)
      at renderChildComponents (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12875:9)
      at renderView (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:12855:13)
      at ComponentFactory.create (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:17092:17)
      at initComponent (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/testing.mjs:1976:51)
      at _ZoneDelegate.Object.<anonymous>._ZoneDelegate.invoke (../../../node_modules/.pnpm/zone.js@0.14.4/node_modules/zone.js/bundles/zone.umd.js:411:30)
      at Object.onInvoke (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:16120:33)
      at _ZoneDelegate.Object.<anonymous>._ZoneDelegate.invoke (../../../node_modules/.pnpm/zone.js@0.14.4/node_modules/zone.js/bundles/zone.umd.js:410:56)
      at Zone.Object.<anonymous>.Zone.run (../../../node_modules/.pnpm/zone.js@0.14.4/node_modules/zone.js/bundles/zone.umd.js:166:47)
      at NgZone.run (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/core.mjs:15981:28)
      at _TestBedImpl.createComponent (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/testing.mjs:1988:41)
      at Function.createComponent (../../../node_modules/.pnpm/@angular+core@18.0.7_rxjs@7.8.1_zone.js@0.14.4/node_modules/@angular/core/fesm2022/testing.mjs:1779:37)
      at src/lib/paginator/paginator.component.spec.ts:14:23

References

@tschaffter
Copy link
Member Author

tschaffter commented Aug 27, 2024

Issue 2: NG0203: inject() must be called from an injection context

Tasks:

  • nx run openchallenges-not-found:test
  • nx run openchallenges-about:test
  • nx run openchallenges-home:test
  • nx run model-ad-not-found:test

This error has been observed since the beginning of the migration to pnpm. It usually happens when the following folders libs/**/api-client-angular/node_modules exist. Removing them manually usually solve the issue. It's not clear what creates this folder.

I think that this issue and the one shown above were again because of cache poisoning, likely from the remote cache. For now all the test tasks are passing locally and I'm rerunning them by the CI workflow after deleting the GitHub secret NX_CLOUD_AUTH_TOKEN, which should definitively disable the remote cache for the CI workflow.

@tschaffter
Copy link
Member Author

Fixed by #2777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@tschaffter and others