{"record":{"id":"f10f8e50a79f9735","repo":"remix-run/remix","slug":"hmr-requires-watch-mode","errorCode":null,"errorMessage":"hmr requires watch mode","messagePattern":"hmr requires watch mode","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/assets/src/lib/asset-server.ts","lineNumber":1044,"sourceCode":"  console.error(error)\n}\n\nfunction resolveAssetServerOptions<transforms extends AssetRequestTransformMap>(\n  options: AssetServerCreateOptions<transforms>,\n): ResolvedAssetServerOptions<transforms> {\n  let rootDir = normalizeFilePath(fs.realpathSync(path.resolve(options.rootDir ?? process.cwd())))\n  let basePath = normalizeBasePath(options.basePath)\n  let scriptOptions = options.scripts ?? {}\n  let fingerprintOptions = normalizeFingerprintOptions({\n    fingerprint: options.fingerprint,\n    watch: options.watch,\n  })\n  let watchOptions = normalizeWatchOptions(options.watch)\n  let hmrFactory = normalizeHmrFactory(options.hmr)\n  let mounts = options.mounts ?? defaultMounts\n\n  if (hmrFactory && watchOptions === null) {\n    throw new TypeError('hmr requires watch mode')\n  }\n  if (Object.keys(mounts).length === 0) {\n    throw new TypeError('mounts must include at least one entry')\n  }\n  return {\n    allowFiles: options.allowFiles,\n    allowPackages: options.allowPackages,\n    basePath,\n    buildId: fingerprintOptions.buildId,\n    define: scriptOptions.define,\n    denyFiles: options.denyFiles,\n    external: scriptOptions.external ?? [],\n    files: normalizeFilesOptions(options.files),\n    fingerprintAssets: fingerprintOptions.enabled,\n    hmr: hmrFactory,\n    minify: options.minify ?? false,\n    mounts,\n    loaders: scriptOptions.loaders ?? [],","sourceCodeStart":1026,"sourceCodeEnd":1062,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/assets/src/lib/asset-server.ts#L1026-L1062","documentation":"`--no-headers` suppresses the header row of the tabular routes output, so it only makes sense alongside `--table`. The parser rejects it in any other mode because there's no header row to suppress.","triggerScenarios":"Running `remix routes --no-headers` without `--table` (e.g. alone or with `--json`) — `noHeaders && !table` triggers the error.","commonSituations":"Pipelines tuned for headerless table output that later dropped `--table`; combining with `--json` by mistake.","solutions":["Add `--table`: `remix routes --table --no-headers`","Or remove `--no-headers` if you want default/JSON output"],"exampleFix":"# before\nremix routes --no-headers\n# after\nremix routes --table --no-headers","handlingStrategy":"validation","validationCode":"let args = ['remix','routes'];\nif (table) { args.push('--table'); if (noHeaders) args.push('--no-headers'); }","typeGuard":"function noHeadersIsValid(f: { table?: boolean; noHeaders?: boolean }): boolean {\n  return !f.noHeaders || Boolean(f.table);\n}","tryCatchPattern":null,"preventionTips":["Only use --no-headers in table pipelines (awk/column)","Keep table flags grouped together in scripts"],"tags":["cli","routes","flag-conflict"],"backgroundTag":"conflicting-cli-flags","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}