vercel/next.js · error

Skipping ${file}: file is empty.

Error message

Skipping ${file}: file is empty.

What it means

uploadTraceToBlob stats each profile file before upload and warns (skipping the file) when its size is zero; an empty trace contains no span data so uploading it is pointless, while the rest of the upload continues.

Source

Thrown at packages/next/src/cli/internal/upload-trace.ts:127

  const uploadUrl = getUploadUrl()

  console.log(`Found ${uploadableFiles.length} file(s) in ${profilesDir}.`)
  console.log(`Uploading to the Next.js team...`)

  const { put } =
    require('next/dist/compiled/@vercel/blob') as typeof import('next/dist/compiled/@vercel/blob')

  let sessionId: string | undefined
  let sessionToken: string | undefined
  let uploadedCount = 0

  for (const file of uploadableFiles) {
    const filePath = path.join(profilesDir, file)

    const stat = await fs.stat(filePath)
    if (stat.size === 0) {
      console.warn(`Skipping ${file}: file is empty.`)
      continue
    }

    const fd = await fs.open(filePath, 'r')
    const headerBuf = Buffer.alloc(16)
    await fd.read(headerBuf, 0, 16, 0)
    await fd.close()

    if (file.endsWith('.cpuprofile')) {
      validateCpuProfile(headerBuf, file)
    } else if (file.endsWith('trace-turbopack.bin')) {
      validateTurbopackTrace(headerBuf, file)
    }

    const content = await fs.readFile(filePath)

    const tokenRes = await fetch(uploadUrl, {
      method: 'POST',

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Ensure the trace file is non-empty before uploading, or remove the empty file from the trace inputs.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/next/src/cli/internal/upload-trace.ts:127 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/1214539db356bed2. Report an issue: GitHub.