Skip to content

vitest requires zone.js when angular is moving away from this #31329

@rajinder-yadav

Description

@rajinder-yadav

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

vitest doesn't work with a zoneless angular app, product the following error:

Error: NG0908: In this configuration Angular requires Zone.js

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

1. create a zoneless angular app
1. add vitest 
1. see runtime error

ref: https://angular.dev/guide/testing/unit-tests

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 20.3.3
Node: 22.20.0
Package Manager: pnpm 10.15.0
OS: linux x64
    

Angular: <error>

Package                      Version
------------------------------------
@angular-devkit/architect    0.2003.3
@angular-devkit/core         20.3.3
@angular-devkit/schematics   20.3.3
@schematics/angular          20.3.3

Anything else?

No response

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