{"record":{"id":"14f7129d86e3ef84","repo":"withastro/astro","slug":"update-new-version-of-astro-available-latestv","errorCode":null,"errorMessage":"update ▶ New version of Astro available: ${latestVersion}\nRun ${execCommand.command} ${execCommand.args.join(' ')} to update","messagePattern":"update ▶ New version of Astro available: (.+?)\nRun (.+?) (.+?) to update","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/astro/src/core/dev/dev.ts","lineNumber":77,"sourceCode":"\t\t\t\t\tif (shouldCheck) {\n\t\t\t\t\t\tconst version = await fetchLatestAstroVersion(restart.container.settings.preferences);\n\n\t\t\t\t\t\tif (gt(version, currentVersion)) {\n\t\t\t\t\t\t\t// Only update the latestAstroVersion if the latest version is greater than the current version, that way we don't need to check that again\n\t\t\t\t\t\t\t// whenever we check for the latest version elsewhere\n\t\t\t\t\t\t\trestart.container.settings.latestAstroVersion = version;\n\n\t\t\t\t\t\t\tconst sameMajor = major(version) === major(currentVersion);\n\t\t\t\t\t\t\tconst sameMinor = minor(version) === minor(currentVersion);\n\t\t\t\t\t\t\tconst patchDistance = patch(version) - patch(currentVersion);\n\n\t\t\t\t\t\t\tif (sameMajor && sameMinor && patchDistance < MAX_PATCH_DISTANCE) {\n\t\t\t\t\t\t\t\t// Don't bother the user with a log if they're only a few patch versions behind\n\t\t\t\t\t\t\t\t// We can still tell them in the dev toolbar, which has a more opt-in nature\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t\t'SKIP_FORMAT',\n\t\t\t\t\t\t\t\tawait newVersionAvailable({\n\t\t\t\t\t\t\t\t\tlatestVersion: version,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(() => {});\n\t\t} catch {\n\t\t\t// Just ignore the error, we don't want to block the dev server from starting and this is just a nice-to-have feature\n\t\t}\n\t}\n\n\tlet store: MutableDataStore | undefined;\n\ttry {\n\t\tconst chunkSize = getDataStoreChunkSize(restart.container.settings);\n\t\tif (chunkSize !== undefined) {","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/withastro/astro/blob/e294953aa8aadd98d5be92e60a03037b05dbdfd4/packages/astro/src/core/dev/dev.ts#L59-L95","documentation":"On dev-server start, Astro asynchronously checks the registry for a newer release. If the installed version is behind by a whole minor/major, or by MAX_PATCH_DISTANCE or more patch versions within the same minor, it prints this upgrade notice with the exact update command for your package manager. Registry failures are swallowed — this never blocks startup.","triggerScenarios":"Running `astro dev` when the published latest version differs in major or minor from the installed one, or the installed patch trails the latest patch by MAX_PATCH_DISTANCE or more.","commonSituations":"Projects pinned to an older Astro major; appearing shortly after a new release ships; offline or proxy-restricted environments simply never see it.","solutions":["Run the exact command shown in the message (e.g. `npx @astrojs/upgrade` or the npm/pnpm install line)","Review the Astro CHANGELOG for breaking changes before jumping a major","Ignore it if you are intentionally pinned — it is informational only"],"exampleFix":"# before: astro@5.0.2 installed, 5.1.0 is latest\n\n# after — run the command the warning prints\nnpx @astrojs/upgrade\n# or explicitly:\nnpm install astro@latest","handlingStrategy":"validation","validationCode":"// CI: flag when astro is a minor/major behind latest\nimport { execSync } from 'node:child_process';\nconst installed = JSON.parse(execSync('npm ls astro --json').toString()).dependencies.astro.version;\nconst latest = execSync('npm view astro version').toString().trim();\nif (installed.split('.').slice(0, 2).join('.') !== latest.split('.').slice(0, 2).join('.')) {\n  console.warn(`astro ${installed} is behind latest ${latest}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Schedule regular dependency updates (Renovate/Dependabot) so the gap never grows","Read the CHANGELOG before major upgrades rather than ignoring the notice","Pin intentionally and treat the message as informational, not an error"],"tags":["versioning","update","dev-server"],"backgroundTag":"outdated-package-version","analyzedSha":"e294953aa8aadd98d5be92e60a03037b05dbdfd4","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}