{"record":{"id":"8ea61ccbcbdf5228","repo":"nodejs/node","slug":"pipeline-definition-id-is-required","errorCode":null,"errorMessage":"pipeline-definition-id is required","messagePattern":"pipeline-definition-id is required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"deps/npm/lib/commands/trust/circleci.js","lineNumber":135,"sourceCode":"    if (!pkgName) {\n      throw new Error('Package name must be specified either as an argument or in package.json file')\n    }\n\n    const orgId = flags['org-id']\n    const projectId = flags['project-id']\n    const pipelineDefinitionId = flags['pipeline-definition-id']\n    const vcsOrigin = flags['vcs-origin']\n    const contextIds = flags['context-id']\n\n    // Validate required flags\n    if (!orgId) {\n      throw new Error('org-id is required')\n    }\n    if (!projectId) {\n      throw new Error('project-id is required')\n    }\n    if (!pipelineDefinitionId) {\n      throw new Error('pipeline-definition-id is required')\n    }\n    if (!vcsOrigin) {\n      throw new Error('vcs-origin is required')\n    }\n\n    // Validate formats\n    this.validateUuid(orgId, 'org-id')\n    this.validateUuid(projectId, 'project-id')\n    this.validateUuid(pipelineDefinitionId, 'pipeline-definition-id')\n    this.validateVcsOrigin(vcsOrigin)\n    if (contextIds?.length > 0) {\n      for (const contextId of contextIds) {\n        this.validateUuid(contextId, 'context-id')\n      }\n    }\n\n    return {\n      values: {","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/npm/lib/commands/trust/circleci.js#L117-L153","documentation":"Thrown by the CircleCI trust provider's `flagsToOptions` when the `--pipeline-definition-id` flag is missing or empty. CircleCI's OIDC trust model binds to a pipeline definition, so its UUID is mandatory.","triggerScenarios":"`flags['pipeline-definition-id']` is falsy during required-flag validation (checked after project-id).","commonSituations":"Newer CircleCI config where pipeline definitions are first-class and the user only knows the project id; omitting the flag in CI templates copied from older examples.","solutions":["Pass `--pipeline-definition-id <uuid>` with the CircleCI pipeline definition UUID.","Locate it in CircleCI under the project's pipeline settings; must be a UUID.","If your CircleCI setup predates pipeline definitions, consult CircleCI docs to find the equivalent identifier."],"exampleFix":"// before\nnpm trust circleci mypkg --org-id <uuid> --project-id <uuid> --vcs-origin github.com/o/r\n// after\nnpm trust circleci mypkg --org-id <uuid> --project-id <uuid> --pipeline-definition-id <uuid> --vcs-origin github.com/o/r","handlingStrategy":"validation","validationCode":"function assertRequiredFlag(flags, name) {\n  if (!flags[name]) throw new Error(`${name} is required`)\n  return flags[name]\n}\nassertRequiredFlag(flags, 'pipeline-definition-id')","typeGuard":"function hasPipelineDefinitionId(flags) {\n  return Boolean(flags && flags['pipeline-definition-id'])\n}","tryCatchPattern":null,"preventionTips":["Familiarize yourself with CircleCI pipeline definitions to locate the UUID.","Pass all three CircleCI ids (org, project, pipeline-definition) together.","Validate in CI before the trust command runs."],"tags":["trust","circleci","required-flag","argument-validation","oidc"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}