From 028b38352a76500571c7d43166cefd5fa2fdb913 Mon Sep 17 00:00:00 2001 From: twerske Date: Wed, 27 Jan 2021 14:23:36 -0800 Subject: [PATCH] docs: add guide for NG0302 (#40580) new guide for pipe not found common error link from pipe error to new guide add embedded debugging video PR Close #40580 --- aio/content/errors/NG0302.md | 18 ++++++++++++++++++ packages/core/src/render3/error_code.ts | 1 + 2 files changed, 19 insertions(+) create mode 100644 aio/content/errors/NG0302.md diff --git a/aio/content/errors/NG0302.md b/aio/content/errors/NG0302.md new file mode 100644 index 0000000000..597dbfc9bf --- /dev/null +++ b/aio/content/errors/NG0302.md @@ -0,0 +1,18 @@ +@name Pipe Not Found +@category runtime +@videoUrl https://www.youtube.com/embed/maI2u6Sxk9M +@shortDescription Pipe not found! + +@description +Angular can't find a pipe with this name. +The pipe referenced in the template has not been named or declared properly. +A [pipe](guide/pipes) must be either declared or imported in the `NgModule` where it is used, and the name used in a template must match the name defined in the pipe decorator. + +@debugging +Use the pipe name to trace the templates or modules where this pipe is declared and used. + +To resolve this error, ensure that: +- A local custom pipe is uniquely named in the pipe's decorator, and declared in the `NgModule`, or +- A pipe from another `NgModule` is added to the imports of the `NgModule` where it is used. + +If you recently added an import or declaration, you may need to restart your server to see these changes. diff --git a/packages/core/src/render3/error_code.ts b/packages/core/src/render3/error_code.ts index bedac94a60..80e478d166 100644 --- a/packages/core/src/render3/error_code.ts +++ b/packages/core/src/render3/error_code.ts @@ -52,6 +52,7 @@ export const RUNTIME_ERRORS_WITH_GUIDES = new Set([ RuntimeErrorCode.PROVIDER_NOT_FOUND, RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH, RuntimeErrorCode.EXPORT_NOT_FOUND, + RuntimeErrorCode.PIPE_NOT_FOUND, ]); /* tslint:enable:no-toplevel-property-access */