{"record":{"id":"a8bae1f0ec702211","repo":"angular/angular-cli","slug":"package-packagename-has-an-invalid-builder-im","errorCode":null,"errorMessage":"Package \"${packageName}\" has an invalid builder implementation path: \"${builderName}\" --> \"${builder.implementation}\"","messagePattern":"Package \"(.+?)\" has an invalid builder implementation path: \"(.+?)\" --> \"(.+?)\"","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/angular_devkit/architect/node/node-modules-architect-host.ts","lineNumber":196,"sourceCode":"      throw new Error(`Cannot find builder ${JSON.stringify(builderStr)}.`);\n    }\n\n    // Resolve alias reference if entry is a string\n    if (typeof builder === 'string') {\n      return this.resolveBuilder(\n        builder,\n        path.dirname(packageJsonPath),\n        (seenBuilders ?? new Set()).add(builderStr),\n      );\n    }\n\n    // Determine builder implementation path (relative within package only)\n    const implementationPath = builder.implementation && path.normalize(builder.implementation);\n    if (!implementationPath) {\n      throw new Error('Could not find the implementation for builder ' + builderStr);\n    }\n    if (path.isAbsolute(implementationPath) || implementationPath.startsWith('..')) {\n      throw new Error(\n        `Package \"${packageName}\" has an invalid builder implementation path: \"${builderName}\" --> \"${builder.implementation}\"`,\n      );\n    }\n\n    // Determine builder option schema path (relative within package only)\n    let schemaPath = builder.schema;\n    if (!schemaPath) {\n      throw new Error('Could not find the schema for builder ' + builderStr);\n    }\n    if (path.isAbsolute(schemaPath) || path.normalize(schemaPath).startsWith('..')) {\n      throw new Error(\n        `Package \"${packageName}\" has an invalid builder schema path: \"${builderName}\" --> \"${builder.schema}\"`,\n      );\n    }\n\n    // The file could be either a package reference or in the local manifest directory.\n    if (schemaPath.startsWith('.')) {\n      schemaPath = path.join(buildersManifestDirectory, schemaPath);","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/architect/node/node-modules-architect-host.ts#L178-L214","documentation":"The builder's implementation path must be relative and stay within the package. resolveBuilder throws when the manifest entry's 'implementation' value is absolute or starts with '..'.","triggerScenarios":"builders.json entry with \"implementation\": \"/abs/path/impl.js\" or \"../other/impl.js\"; monorepo setups sharing implementation files across packages.","commonSituations":"Custom builder packages reaching into sibling directories; hand-crafted manifests with machine-specific absolute paths; publishing packages built with paths meant only for local dev.","solutions":["Place the implementation inside the package and set a relative path like './impl.js'.","Copy shared implementation files into the package at build time (bundle them).","Rebuild/republish the manifest with normalized relative paths."],"exampleFix":"// before (builders.json)\n\"implementation\": \"../shared/impl.js\"\n// after\n\"implementation\": \"./impl.js\"","handlingStrategy":"validation","validationCode":"const impl = require(`${packageName}/builders.json`).builders?.[builderName]?.implementation;\nif (impl && (path.isAbsolute(impl) || impl.startsWith('..'))) throw new Error(`Invalid implementation path: ${impl}`);","typeGuard":null,"tryCatchPattern":"try { await host.resolveBuilder(builderStr); } catch (e) { if (String(e.message).includes('invalid builder implementation path')) { /* make the implementation path relative and inside the package */ } else throw e; }","preventionTips":["Keep builder implementation files inside the package directory.","Never use absolute or '../' paths in published manifests.","Run a packaging test (npm pack, install, resolve) before publishing."],"tags":["angular","builder","path"],"backgroundTag":"invalid-builder-path","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}