Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make "No pipe found" error message more actionable for common pipes #62136

Closed
@AndrewKushnir

Description

@AndrewKushnir

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

compiler

Is this a regression?

No

Description

Currently, when a template refers to a non-imported pipe, there is an error like this:

✘ [ERROR] NG8004: No pipe found with name 'titlecase'.

    src/app/app.ts:284:28:
      284 │                 {{ layout | titlecase }}
          ╵                             ~~~~~~~~~

The proposal is to provide a more actionable error message and include steps to fix it, for example:

✘ [ERROR] NG8004: No pipe found with name 'titlecase'. To fix this, please import the `TitlecasePipe` from "@angular/common" and add it into the list of dependencies in the `@Component.imports` field.

(adding "ai" label, since this would be helpful for cases when we ask LLMs for fix the problem)

Metadata

Metadata

Assignees

Labels

aiIssue related to using AI agentsarea: compilerIssues related to `ngc`, Angular's template compilerstate: has PR

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions