{"record":{"id":"93fc9fec87046b0e","repo":"vercel/next.js","slug":"failed-to-parse-source-map-sourcemapfilename","errorCode":null,"errorMessage":"Failed to parse source map ${sourceMapFilename}.","messagePattern":"Failed to parse source map (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/dev/get-source-map-from-file.ts","lineNumber":82,"sourceCode":"      return JSON.parse(buffer.toString())\n    } catch (error) {\n      throw new Error(`Failed to parse source map for ${filename}.`, {\n        cause: error,\n      })\n    }\n  }\n\n  const sourceMapFilename = path.resolve(\n    path.dirname(filename),\n    decodeURIComponent(sourceUrl)\n  )\n\n  try {\n    const sourceMapContents = await fs.readFile(sourceMapFilename, 'utf-8')\n\n    return JSON.parse(sourceMapContents.toString())\n  } catch (error) {\n    throw new Error(`Failed to parse source map ${sourceMapFilename}.`, {\n      cause: error,\n    })\n  }\n}\n","sourceCodeStart":64,"sourceCodeEnd":87,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/server/dev/get-source-map-from-file.ts#L64-L87","documentation":"Wrapper in getSourceMapFromFile for the external-map case: reading or JSON.parsing the sibling .map file resolved from sourceMappingURL failed, with the original error as cause. Missing or corrupt external source map files on disk produce this.","triggerScenarios":"A referenced source map file fails to parse.","commonSituations":"An invalid .map file referenced by a compiled asset in dev.","solutions":["Ensure the source map file contains valid JSON; regenerate it."],"exampleFix":null,"handlingStrategy":"try-catch","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"}