{"record":{"id":"c2f4944ae7cc974b","repo":"vercel/next.js","slug":"request-failed-with-empty-body","errorCode":null,"errorMessage":"request failed with empty body","messagePattern":"request failed with empty body","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/lib/download-swc.ts","lineNumber":51,"sourceCode":"      cacheDirectory,\n      `${tarFileName}.temp-${Date.now()}`\n    )\n\n    const registry = getRegistry()\n\n    const downloadUrl = `${registry}${pkgName}/-/${tarFileName}`\n\n    await fetch(downloadUrl).then((res) => {\n      const { ok, body } = res\n      if (!ok || !body) {\n        Log.error(`Failed to download swc package from ${downloadUrl}`)\n      }\n\n      if (!ok) {\n        throw new Error(`request failed with status ${res.status}`)\n      }\n      if (!body) {\n        throw new Error('request failed with empty body')\n      }\n      const cacheWriteStream = fs.createWriteStream(tempFile)\n      return body.pipeTo(\n        new WritableStream({\n          write(chunk) {\n            return new Promise<void>((resolve, reject) =>\n              cacheWriteStream.write(chunk, (error) => {\n                if (error) {\n                  reject(error)\n                  return\n                }\n\n                resolve()\n              })\n            )\n          },\n          close() {\n            return new Promise<void>((resolve, reject) =>","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/lib/download-swc.ts#L33-L69","documentation":"Download integrity failure in extractBinary: the registry responded ok but with no response body, so there is nothing to stream to the temp file for the SWC package tarball. This catches the degenerate case where the status alone looked successful.","triggerScenarios":"The SWC binary download response body is empty.","commonSituations":"A proxy or interrupted connection returns an empty body during SWC download.","solutions":["Retry the download; if persistent, install the platform-specific @next/swc package manually."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}