{"record":{"id":"345ec0433242368e","repo":"angular/angular-cli","slug":"error-345ec0","errorCode":null,"errorMessage":"*","messagePattern":"\\*","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/angular_devkit/build_angular/src/builders/extract-i18n/ivy-extract-loader.ts","lineNumber":69,"sourceCode":"    MessageExtractor = MsgExtractor;\n  } catch {\n    throw new Error(\n      `Unable to load message extractor. Please ensure '@angular/localize' is installed.`,\n    );\n  }\n\n  // Setup a Webpack-based logger instance\n  const logger = {\n    // level 2 is warnings\n    level: 2,\n    debug(...args: string[]): void {\n      // eslint-disable-next-line no-console\n      console.debug(...args);\n    },\n    info(...args: string[]): void {\n      loaderContext.emitWarning(new Error(args.join('')));\n    },\n    warn(...args: string[]): void {\n      loaderContext.emitWarning(new Error(args.join('')));\n    },\n    error(...args: string[]): void {\n      loaderContext.emitError(new Error(args.join('')));\n    },\n  };\n\n  let filename = loaderContext.resourcePath;\n  const mapObject =\n    typeof map === 'string' ? (JSON.parse(map) as Exclude<LoaderSourceMap, string>) : map;\n  if (mapObject?.file) {\n    // The extractor's internal sourcemap handling expects the filenames to match\n    filename = nodePath.join(loaderContext.context, mapObject.file);\n  }\n\n  // Setup a virtual file system instance for the extractor\n  // * MessageExtractor itself uses readFile, relative and resolve\n  // * Internal SourceFileLoader (sourcemap support) uses dirname, exists, readFile, and resolve","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/build_angular/src/builders/extract-i18n/ivy-extract-loader.ts#L51-L87","documentation":"The ivy extraction webpack loader wraps the localization logger: info() and warn() calls from @angular/localize's extraction are routed to webpack's emitWarning as Error objects, and error() to emitError. This surfaces internal extraction diagnostics as webpack warnings in the build output.","triggerScenarios":"Running extract-i18n with the ivy loader when @angular/localize's extractor logs an info or warning message during message extraction (e.g., schema issues, malformed i18n metadata).","commonSituations":"Extraction warnings from the Angular compiler/localize tooling appear as webpack 'Error:' warnings; developers are confused seeing non-fatal messages as warnings.","solutions":["Read the warning text after 'Error:' to see the actual extraction diagnostic and fix the underlying i18n source issue.","Check templates' i18n attributes and tsconfig compilerOptions for misconfiguration flagged by the extractor.","Upgrade @angular/localize and @angular-devkit/build-angular to aligned versions to reduce spurious extraction warnings."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Keep localize/build packages version-aligned:\nconst pkg = require('./package.json');\nconst v = pkg.dependencies['@angular/core'];\nif (!pkg.dependencies['@angular/localize']?.startsWith(v.split('.').slice(0,2).join('.'))) console.warn('Version mismatch: @angular/localize vs @angular/core');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep @angular/localize at the same minor version as @angular/core.","Treat 'Error:'-prefixed webpack warnings from the extract loader as diagnostics to read, not crashes.","Fix flagged i18n metadata in templates rather than suppressing loader warnings."],"tags":["i18n","webpack-loader","angular"],"backgroundTag":"webpack-loader-warning","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}