mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
8 lines
368 B
TypeScript
8 lines
368 B
TypeScript
const MINIMUM_NODE_MAJOR = 22;
|
|
|
|
export function runtimeVersionError(version: string): string | null {
|
|
const major = Number.parseInt(version.split(".", 1)[0] ?? "", 10);
|
|
if (Number.isFinite(major) && major >= MINIMUM_NODE_MAJOR) return null;
|
|
return `HyperFrames requires Node.js >= ${MINIMUM_NODE_MAJOR} (current: ${version}). Switch Node versions and retry.`;
|
|
}
|