Skip to content

NG0911: View has already been destroyed #422

@marcus-sa

Description

@marcus-sa

This test breaks after upgrading Angular dependencies from 16.2.8 to 17.0.3 and @testing-library/angular from 14.3.0 to 14.5.0
https://github.com/marcus-sa/ngkit/blob/9d6ee2c875cdede09671a7a0673b378453801a77/packages/core/src/lib/integration.spec.ts#L35-L46

stderr | src/lib/integration.spec.ts > declaration specific dependencies should be available for components
RuntimeError: NG0911: View has already been destroyed.
    at storeLViewOnDestroy (file:///Users/marcus-sa/Git/packages/core/src/render3/util/view_utils.ts:254:4)
    at ViewRef$1.onDestroy (file:///Users/marcus-sa/Git/deepkit/ngkit/node_modules/@angular/core/fesm2022/core.mjs:13735:9)
    at ComponentRef.onDestroy (file:///Users/marcus-sa/Git/packages/core/src/render3/component_ref.ts:376:10)
    at renderFixture (file:///Users/marcus-sa/Git/deepkit/ngkit/projects/testing-library/src/lib/testing-library.ts:260:33)
    at Module.render (file:///Users/marcus-sa/Git/deepkit/ngkit/projects/testing-library/src/lib/testing-library.ts:166:19) {
  code: 911
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions