{"record":{"id":"73cb9459d276343a","repo":"mastra-ai/mastra","slug":"computenextfireat-is-not-available-in-this-versi","errorCode":null,"errorMessage":"`computeNextFireAt` is not available in this version of @mastra/core. Schedules require @mastra/core >= 1.32.0.","messagePattern":"`computeNextFireAt` is not available in this version of @mastra/core\\. Schedules require @mastra/core >= 1\\.32\\.0\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/server/src/server/handlers/schedules-workflows-shim.ts","lineNumber":29,"sourceCode":" * A namespace import tolerates missing names. We expose the real function\n * when available and fall back to a function that throws a clear error\n * otherwise — schedules require new-core support anyway, so loud failure at\n * the call site is far better than silent corruption.\n *\n * Typed as `any` on purpose (see ./observability-storage-schemas.ts for\n * the same rationale): keeps the emitted `.d.ts` free of names that don't\n * exist in older cores.\n */\n\nimport * as coreWorkflows from '@mastra/core/workflows';\n\nconst exportedNext = (coreWorkflows as Record<string, unknown>).computeNextFireAt;\nconst exportedValidate = (coreWorkflows as Record<string, unknown>).validateCron;\n\nexport const computeNextFireAt: any =\n  exportedNext ??\n  (() => {\n    throw new Error(\n      '`computeNextFireAt` is not available in this version of @mastra/core. ' +\n        'Schedules require @mastra/core >= 1.32.0.',\n    );\n  });\n\nexport const validateCron: any =\n  exportedValidate ??\n  (() => {\n    throw new Error(\n      '`validateCron` is not available in this version of @mastra/core. ' + 'Schedules require @mastra/core >= 1.32.0.',\n    );\n  });\n","sourceCodeStart":11,"sourceCodeEnd":42,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/schedules-workflows-shim.ts#L11-L42","documentation":"schedules-workflows-shim re-exports computeNextFireAt from @mastra/core; if the installed core version does not export it (< 1.32.0), the shim substitutes a throwing stub, so any schedule computation (e.g. listing schedules, computing next run) crashes with this message.","triggerScenarios":"Any schedules API call that needs to compute a cron's next fire time while @mastra/core resolves to a version older than 1.32.0, or a version where the export was renamed/removed.","commonSituations":"Lockfile pinned to an older core; monorepo dependency mismatch where @mastra/server is newer than @mastra/core; partial upgrade of @mastra/* packages.","solutions":["Upgrade @mastra/core to >= 1.32.0 (pnpm --filter ... @mastra/core@latest or update the lockfile).","Align all @mastra/* package versions so server and core are from the same minor series.","Verify after install that `import('@mastra/core').computeNextFireAt` exists (no undefined export)."],"exampleFix":"// before (package.json)\n\"@mastra/core\": \"1.30.2\"\n// after\n\"@mastra/core\": \"^1.32.0\"","handlingStrategy":"fallback","validationCode":"import * as core from '@mastra/core';\nif (typeof (core as any).computeNextFireAt !== 'function') {\n  throw new Error('@mastra/core >= 1.32.0 is required for schedules');\n}","typeGuard":null,"tryCatchPattern":"try {\n  const next = await client.computeNextFireAt(cron);\n} catch (e) {\n  if (/computeNextFireAt/.test(String(e?.message))) {\n    // upgrade core then retry\n    throw new Error('Upgrade @mastra/core to >= 1.32.0 to use schedules');\n  }\n  throw e;\n}","preventionTips":["Pin @mastra/core >= 1.32.0 wherever @mastra/server schedules features are used.","Add a startup check that the core exports exist before registering schedules.","Keep all @mastra/* packages on the same version line; run pnpm why @mastra/core after upgrades."],"tags":["version-mismatch","schedules","cron","dependency"],"backgroundTag":"missing-core-export","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}