immich-app/immich · error · ReleaseError
Invalid pump
Error message
Invalid pump
What it means
The release script (getNewVersion) validates that the requested release type is applicable to the current version: e.g. 'patch'/'minor' are only allowed from a stable version, 'prerelease' only from a prerelease, 'release' only promotes a prerelease without changing core numbers. If the bump is invalid or would be an invalid upgrade from a prerelease to a different stable version, a ReleaseError is thrown describing the offending version transition.
Solutions
- Match the release type to the current version: stable => patch/minor/major; prerelease => prerelease or release (to promote in place).
- If you want a stable release from a prerelease with a version change, first set the target version explicitly, then release.
- Check the current version in package.json before configuring the CI bump type.
- If the transition should be legal, adjust the ReleaseError condition mapping in packages/scripts/src/commands/release.ts.
Example fix
// before: package.json version 2.0.0-next.1, run release with type=patch // after: promote correctly "version": "2.0.0-next.1" => run: npm run release -- type=release // produces 2.0.0
Defensive patterns
Strategy: validation
Validate before calling
import { parse } from 'semver';
const v = parse(require('./package.json').version)!;
const allowed = prerelease(v) ? ['prerelease', 'release'] : ['patch', 'minor', 'major'];
if (!allowed.includes(type)) throw new Error(`type=${type} invalid for ${v.raw}`); Try / catch
try {
const next = getNewVersion(current, type);
} catch (e) {
if (e instanceof ReleaseError) {
console.error(`cannot ${type}-bump from ${e.version}; use prerelease/release`);
process.exit(1);
}
throw e;
} Prevention
- Derive the CI bump type from whether package.json's version is a prerelease
- Promote prereleases with type=release, not patch/minor
- Avoid hand-editing version fields before scripted releases
When it happens
Trigger: Running a release with type 'patch'/'minor' while package.json's version is a prerelease (e.g. 1.2.3-next.5); running 'prerelease' while on a stable version; running 'release' where the promotion changes major/minor/patch; or 'release' on an already-stable version.
Common situations: CI release pipeline picking a bump type that doesn't match the current main-branch version after a previous prerelease cycle; manually editing version in package.json to a prerelease and then triggering a stable release.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
AI-assisted analysis of immich-app/immich@e55ac299a4 (2026-09-15).
Data as JSON: /api/errors/89391dac07aab0cd.
Report an issue: GitHub.
Appendix: source
Thrown at packages/scripts/src/commands/release.ts:179
throw new ReleaseInputError();
}
newVersionRaw = normalize(newVersionRaw);
const newVersion = semver.parse(newVersionRaw);
if (!newVersion) {
throw new ReleaseInputError();
}
const invalidUpgrade =
isPrerelease(version) &&
!isPrerelease(newVersion) &&
(version.major !== newVersion.major ||
version.minor !== newVersion.minor ||
version.patch !== newVersion.patch);
if (!valid || invalidUpgrade) {
throw new ReleaseError({
version: versionRaw,
newVersion: newVersionRaw,
});
}
return newVersionRaw;
};
const RADIX = 100;
const STABLE = RADIX - 1;
export const getMobileBuild = (version: SemVer) => {
const { major, minor, patch, prerelease } = version;
const candidate = prerelease[1];
const digit = typeof candidate === 'number' ? candidate : STABLE;
const valid =
major < RADIX &&View on GitHub (pinned to e55ac299a4)