discordjs/discord.js · error · Error
Package ${packageName} not releaseable
Error message
Package ${packageName} not releaseable What it means
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.
Source
Thrown at packages/actions/src/releasePackages/generateReleaseTree.ts:141
}
if (pkg.dependencies) {
release.dependsOn = Object.keys(pkg.dependencies);
}
releaseEntries.push(release);
}
return releaseEntries;
}
export async function generateReleaseTree(dry: boolean, devTag?: string, packageName?: string, exclude?: string[]) {
let releaseEntries = await getReleaseEntries(dry, devTag);
// Try to early return if the package doesn't have deps
if (packageName && packageName !== 'all') {
const releaseEntry = releaseEntries.find((entry) => entry.name === packageName);
if (!releaseEntry) {
throw new Error(`Package ${packageName} not releaseable`);
}
if (!releaseEntry.dependsOn) {
return [[releaseEntry]];
}
}
// Generate the whole tree first, then prune if specified
const releaseTree: ReleaseEntry[][] = [];
const didRelease = new Set<string>();
while (releaseEntries.length) {
const nextBranch: ReleaseEntry[] = [];
const unreleased: ReleaseEntry[] = [];
for (const entry of releaseEntries) {
if (!entry.dependsOn) {
nextBranch.push(entry);
continue;View on GitHub (pinned to a81ed8a306)
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.
Example fix
// before pnpm release discord.js-types // misspelled/renamed package // after pnpm release @discordjs/types // exact entry.name value
Defensive patterns
Strategy: validation
Validate before calling
const validNames = new Set((await getReleaseEntries(dry, tag)).map((e) => e.name));
if (packageName !== 'all' && !validNames.has(packageName)) {
throw new Error(`Unknown package ${packageName}; releaseable: ${[...validNames].join(', ')}`);
} Type guard
const isReleaseable = (name: string, entries: { name: string }[]) => entries.some((e) => e.name === name); Try / catch
try {
await generateReleaseTree(dry, tag, packageName, exclude);
} catch (err) {
if ((err as Error).message.startsWith('Package ')) {
console.error(`Package ${packageName} is not releaseable; run without a name to list candidates.`);
} else throw err;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- The --tag option can only be used with --dev
- One or more packages have dependents that can't be released:
- ClientMissingIntents
- Cannot set an interval greater than 4 hours
- Expected token to be set for this request, but none was pres
AI-assisted analysis of discordjs/discord.js@a81ed8a306 (2026-08-30).
Data as JSON: /api/errors/8766fd379fb3a26b.
Report an issue: GitHub.