You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[vitest-angular]: NG0304: 'search' is not a known element #2097
Please provide the environment you discovered this bug in.
If using the HTML search element within an angular component, there is always the following printed to the stderr: NG0304: 'search' is not a known element
If using nx with vitest-analog or a plain Angular project with @analogjs/vitest-angular, in both cases the error NG0304 occurs for search.
If using the default Angular Vitest integration the error does not occur.
Please provide the exception or error you saw
> stderr | src/app/app.spec.ts > App > should create the app
> NG0304: 'search' is not a known element (used in the 'App2' component template):
> 1. If 'search' is an Angular component, then verify that it is included in the '@Component.imports' of this component.
> 2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@Component.schemas' of this component.
Other information
No response
I would be willing to submit a PR to fix this issue
Activity
ajitzero commentedon Mar 3, 2026
This is a bug with
@angular/core, which is used by Analog.jsPlease report this in https://github.com/angular/angular
jase88 commentedon Mar 3, 2026
The support for the search element was added some time ago already to the angular compiler: angular/angular#54944
It works fine on angular side. It compiles fine while building and also works with the their vitest integration.
The error only occurs on Tests with vitest Analog in a nx workspace or on a Angular project with
@analogjs/vitest-angular.I'm unsure where the error is originated