{"record":{"id":"8766fd379fb3a26b","repo":"discordjs/discord.js","slug":"package-packagename-not-releaseable","errorCode":null,"errorMessage":"Package ${packageName} not releaseable","messagePattern":"Package (.+?) not releaseable","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/actions/src/releasePackages/generateReleaseTree.ts","lineNumber":141,"sourceCode":"\t\t}\n\n\t\tif (pkg.dependencies) {\n\t\t\trelease.dependsOn = Object.keys(pkg.dependencies);\n\t\t}\n\n\t\treleaseEntries.push(release);\n\t}\n\n\treturn releaseEntries;\n}\n\nexport async function generateReleaseTree(dry: boolean, devTag?: string, packageName?: string, exclude?: string[]) {\n\tlet releaseEntries = await getReleaseEntries(dry, devTag);\n\t// Try to early return if the package doesn't have deps\n\tif (packageName && packageName !== 'all') {\n\t\tconst releaseEntry = releaseEntries.find((entry) => entry.name === packageName);\n\t\tif (!releaseEntry) {\n\t\t\tthrow new Error(`Package ${packageName} not releaseable`);\n\t\t}\n\n\t\tif (!releaseEntry.dependsOn) {\n\t\t\treturn [[releaseEntry]];\n\t\t}\n\t}\n\n\t// Generate the whole tree first, then prune if specified\n\tconst releaseTree: ReleaseEntry[][] = [];\n\tconst didRelease = new Set<string>();\n\n\twhile (releaseEntries.length) {\n\t\tconst nextBranch: ReleaseEntry[] = [];\n\t\tconst unreleased: ReleaseEntry[] = [];\n\t\tfor (const entry of releaseEntries) {\n\t\t\tif (!entry.dependsOn) {\n\t\t\t\tnextBranch.push(entry);\n\t\t\t\tcontinue;","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/discordjs/discord.js/blob/a81ed8a306d37fdc746e26a634b6a42164ba2c8c/packages/actions/src/releasePackages/generateReleaseTree.ts#L123-L159","documentation":"generateReleaseTree builds the layered dependency tree of packages to release. When a specific packageName is given (and it is not 'all'), it looks up that package among the computed release entries; if the package is not present in the entries (e.g. it has no pending release given the dev tag, or the name does not match), it throws this error to stop the release early instead of producing an empty/incorrect tree.","triggerScenarios":"Running the release CLI with a packageName argument that either does not exist, is misspelled, or has no release entries under the current --dev/--tag/dry settings, so `releaseEntries.find((entry) => entry.name === packageName)` returns undefined.","commonSituations":"Typo in the package name on the CLI; releasing a package whose changes were already released (so it is filtered out of release entries); using a dev tag that excludes the package; CI config referencing a renamed or removed package.","solutions":["Verify the exact package name matches the entry.name value (check the package's package.json name field).","Run without a packageName (or with 'all') to list which packages are actually releaseable, then retry with a valid name.","Check your --dev/--tag options: a tag may filter the package out of the release entries.","If the package was renamed/removed, update the CI workflow or release command to use the new name."],"exampleFix":"// before\npnpm release discord.js-types   // misspelled/renamed package\n// after\npnpm release @discordjs/types   // exact entry.name value","handlingStrategy":"validation","validationCode":"const validNames = new Set((await getReleaseEntries(dry, tag)).map((e) => e.name));\nif (packageName !== 'all' && !validNames.has(packageName)) {\n  throw new Error(`Unknown package ${packageName}; releaseable: ${[...validNames].join(', ')}`);\n}","typeGuard":"const isReleaseable = (name: string, entries: { name: string }[]) => entries.some((e) => e.name === name);","tryCatchPattern":"try {\n  await generateReleaseTree(dry, tag, packageName, exclude);\n} catch (err) {\n  if ((err as Error).message.startsWith('Package ')) {\n    console.error(`Package ${packageName} is not releaseable; run without a name to list candidates.`);\n  } else throw err;\n}","preventionTips":["Copy package names from the workspace package.json, never by hand.","Run the release command without a packageName first to see releaseable entries.","Keep CI release scripts in sync with package renames."],"tags":["release","cli","configuration"],"backgroundTag":"package-not-releaseable","analyzedSha":"a81ed8a306d37fdc746e26a634b6a42164ba2c8c","analyzedAt":"2026-08-30T04:07:22.193Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}