{"record":{"id":"ffa54bb053c8b4e7","repo":"angular/angular-cli","slug":"pipe-pipe-is-not-defined","errorCode":null,"errorMessage":"Pipe \"${pipe}\" is not defined.","messagePattern":"Pipe \"(.+?)\" is not defined\\.","errorType":"exception","errorClass":"UnknownPipeException","httpStatus":null,"severity":"error","filePath":"packages/angular_devkit/schematics/src/rules/template.ts","lineNumber":134,"sourceCode":"        }\n      } else {\n        const [name, ...pipes] = match.split(options.pipeSeparator);\n        replacement = data[name];\n\n        if (typeof replacement == 'function') {\n          replacement = replacement.call(data, original);\n        }\n\n        if (replacement === undefined) {\n          throw new OptionIsNotDefinedException(name);\n        }\n\n        replacement = pipes.reduce((acc: string, pipe: string) => {\n          if (!pipe) {\n            return acc;\n          }\n          if (!(pipe in data)) {\n            throw new UnknownPipeException(pipe);\n          }\n          const pipeFn = data[pipe];\n          if (typeof pipeFn != 'function') {\n            throw new InvalidPipeException(pipe);\n          }\n\n          // Coerce to string.\n          return '' + pipeFn(acc);\n        }, '' + replacement);\n      }\n\n      path = path.substring(0, start) + replacement + path.substring(end + ieL);\n\n      start = path.indexOf(options.interpolationStart);\n      // See above.\n      end = path.indexOf(options.interpolationEnd, start + isL + 1);\n    }\n","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/schematics/src/rules/template.ts#L116-L152","documentation":"After resolving a piped placeholder's base value, each pipe segment is looked up in the template data; a pipe name not present in data throws UnknownPipeException. Pipes are just functions provided via applyTemplates (e.g. dasherize, capitalize).","triggerScenarios":"Path '__name@dasherise__' (typo) or '__name@camelize__' where no 'camelize' function was passed into the template options.","commonSituations":"Misspelled pipe names in template file names; forgetting to import/pass utility functions into applyTemplates; custom pipes not added to the data object.","solutions":["Pass the pipe function into applyTemplates, e.g. applyTemplates({ dasherize: string.dasherize }).","Fix the pipe name typo in the template path.","Define and supply your custom pipe function in the options data."],"exampleFix":"// before\napplyTemplates({}) // pipe 'dasherize' undefined\n// after\napplyTemplates({ dasherize: (s: string) => strings.dasherize(s) })","handlingStrategy":"validation","validationCode":"const pipes = [...path.matchAll(new RegExp(`[^${options.pipeSeparator}]+`, 'g'))];\nconst missing = pipes.map(p => p[0]).filter(p => typeof data[p] !== 'function');\nif (missing.length) throw new Error(`Pipes not provided: ${missing.join(', ')}`);","typeGuard":"function hasPipe(data: Record<string, unknown>, pipe: string): data is Record<string, (v: string) => string> & Record<string, unknown> {\n  return typeof data[pipe] === 'function';\n}","tryCatchPattern":"try {\n  return mergeWith(apply(source, [template(options)]));\n} catch (err) {\n  if (err instanceof UnknownPipeException) {\n    console.error('Register pipe function in template options:', err.message);\n  }\n}","preventionTips":["Always import @angular-devkit/core `strings` and pass needed helpers (dasherize, classify, etc.) to applyTemplates.","Check spelling of pipe segments in template file names.","Document the available pipes next to your template folder."],"tags":["schematics","template","pipes","missing-option"],"backgroundTag":"unknown-template-pipe","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}