{"record":{"id":"55f8260e8c1796da","repo":"remix-run/remix","slug":"fingerprint-buildid-must-be-a-string","errorCode":null,"errorMessage":"fingerprint.buildId must be a string","messagePattern":"fingerprint\\.buildId must be a string","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/assets/src/lib/asset-server.ts","lineNumber":1164,"sourceCode":"  fingerprint: AssetServerOptions['fingerprint']\n  watch: AssetServerOptions['watch']\n}):\n  | {\n      enabled: false\n      buildId?: string\n    }\n  | {\n      enabled: true\n      buildId: string\n    } {\n  if (!options.fingerprint) {\n    return {\n      enabled: false,\n    }\n  }\n\n  if (typeof options.fingerprint.buildId !== 'string') {\n    throw new TypeError('fingerprint.buildId must be a string')\n  }\n\n  if (options.fingerprint.buildId.length === 0) {\n    throw new TypeError('fingerprint.buildId must be a non-empty string')\n  }\n\n  if (options.watch !== false) {\n    throw new TypeError('fingerprint cannot be used with watch mode')\n  }\n\n  return {\n    enabled: true,\n    buildId: options.fingerprint.buildId,\n  }\n}\n\nfunction normalizeWatchOptions(\n  options: AssetServerOptions['watch'],","sourceCodeStart":1146,"sourceCodeEnd":1182,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/assets/src/lib/asset-server.ts#L1146-L1182","documentation":"When the `fingerprint` option is enabled, it must carry a `buildId` string so the asset server can build content-hashed asset URLs. This error fires when fingerprinting is on but `fingerprint.buildId` is not a string.","triggerScenarios":"Passing `fingerprint: { enabled: true }` (or a truthy `fingerprint`) without `buildId`, or with `buildId: undefined`/non-string, to the asset server options.","commonSituations":"Enabling fingerprinting in production builds without wiring the build ID from the bundler; spreading a fingerprint config where `buildId` was dropped; forgetting that falsy-but-present `fingerprint` objects skip this branch only when disabled.","solutions":["Set `fingerprint: { enabled: true, buildId }` where `buildId` comes from your build output/manifest","Ensure `buildId` is defined before constructing options (default it, e.g. from `process.env.BUILD_ID`)","Disable fingerprinting (`fingerprint: false`) if you don't need hashed URLs"],"exampleFix":"// before\nfingerprint: { enabled: true }\n// after\nfingerprint: { enabled: true, buildId: manifest.buildId }","handlingStrategy":"validation","validationCode":"if (fingerprint?.enabled && typeof fingerprint.buildId !== 'string') {\n  throw new Error('buildId is required when fingerprinting is enabled')\n}","typeGuard":"function hasValidBuildId(f: unknown): f is { enabled: true; buildId: string } {\n  return !!f && typeof f === 'object' && (f as any).enabled !== false && typeof (f as any).buildId === 'string' && (f as any).buildId.length > 0\n}","tryCatchPattern":null,"preventionTips":["Wire buildId from the build manifest and fail fast if it's missing","Treat fingerprint config as derived from build output, not hand-written"],"tags":["config","fingerprinting","validation","asset-server"],"backgroundTag":"config-type-validation","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}