{"record":{"id":"d559817d8f620f22","repo":"remix-run/remix","slug":"fingerprint-cannot-be-used-with-watch-mode","errorCode":null,"errorMessage":"fingerprint cannot be used with watch mode","messagePattern":"fingerprint cannot be used with watch mode","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/assets/src/lib/asset-server.ts","lineNumber":1172,"sourceCode":"      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'],\n): AssetServerWatchOptions | null {\n  if (options === false) return null\n  if (options == null || options === true) return {}\n  return options\n}\n\nfunction hasPackages(packages: readonly string[] | undefined): boolean {\n  return packages !== undefined && packages.length > 0","sourceCodeStart":1154,"sourceCodeEnd":1190,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/assets/src/lib/asset-server.ts#L1154-L1190","documentation":"Fingerprinted asset URLs are content-stable per build and only make sense for immutable, built output. Watch mode rebuilds continuously and serves in-memory assets, so the asset server rejects combining `fingerprint` with `watch !== false`.","triggerScenarios":"Passing both `fingerprint: { enabled: true, buildId }` and `watch: true` (or omitting `watch`, since the check requires `watch === false`) in the same asset server options.","commonSituations":"Sharing one config object between dev (`watch: true`) and prod builds and enabling fingerprinting unconditionally; env-driven configs where fingerprinting is on but watch mode was never disabled.","solutions":["Set `watch: false` when fingerprinting is enabled (production config)","Split dev/prod configs so dev uses `watch: true` without `fingerprint` and prod uses `fingerprint` with `watch: false`"],"exampleFix":"// before\nconst options = { watch: true, fingerprint: { enabled: true, buildId } }\n// after\nconst options = isDev\n  ? { watch: true }\n  : { watch: false, fingerprint: { enabled: true, buildId } }","handlingStrategy":"validation","validationCode":"if (fingerprint?.enabled && watch !== false) {\n  throw new Error('fingerprint requires watch: false (production config)')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep separate dev and prod option builders so watch/fingerprint never mix","Gate fingerprinting behind a production flag in one place"],"tags":["config","fingerprinting","watch-mode","conflicting-options"],"backgroundTag":"conflicting-config-options","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}