vercel/next.js · error · Error
Failed to fetch registry info for ${pkg}, got status ${res.s
Error message
Failed to fetch registry info for ${pkg}, got status ${res.status} What it means
Registry lookup failure in fetchPkgInfo while checking optional SWC dependency versions for lockfile correction: the HTTP fetch of `${registry}${pkg}` returned a non-ok status. The registry URL comes from getRegistry(), so misconfigured registries or unavailable packages produce this error.
Source
Thrown at packages/next/src/lib/patch-incorrect-lockfile.ts:17
import { readFileSync, writeFileSync } from 'fs'
import * as Log from '../build/output/log'
import findUp from 'next/dist/compiled/find-up'
// @ts-ignore no-json types
import { optionalDependencies as nextOptionalDeps } from 'next/package.json'
import type { UnwrapPromise } from './coalesced-function'
import { isCI } from '../server/ci-info'
import { getRegistry } from './helpers/get-registry'
let registry: string | undefined
async function fetchPkgInfo(pkg: string) {
if (!registry) registry = getRegistry()
const res = await fetch(`${registry}${pkg}`)
if (!res.ok) {
throw new Error(
`Failed to fetch registry info for ${pkg}, got status ${res.status}`
)
}
const data = await res.json()
const versionData = data.versions[process.env.__NEXT_VERSION as string]
return {
os: versionData.os,
cpu: versionData.cpu,
engines: versionData.engines,
tarball: versionData.dist.tarball,
integrity: versionData.dist.integrity,
}
}
/**
* Attempts to patch npm package-lock.json when it
* fails to include optionalDependencies for other platformsView on GitHub (pinned to 0eb3775416)
Solutions
- Check network/registry availability and retry the install so the lockfile can be patched.
Defensive patterns
Strategy: retry
When it happens
Trigger: Fetching package registry metadata to patch a lockfile returns an error status.
Common situations: Registry is unreachable or rate-limited while Next.js verifies lockfile correctness.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/062d16a76e222fc1.
Report an issue: GitHub.