{"record":{"id":"9331af00d7200c4c","repo":"remix-run/remix","slug":"hmr-must-be-provided","errorCode":null,"errorMessage":"hmr must be provided","messagePattern":"hmr must be provided","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/assets/src/lib/asset-server.ts","lineNumber":922,"sourceCode":"  let hmrBase = `${basePath}/__remix_hmr`\n  return {\n    client: `${hmrBase}/client.js`,\n    events: `${hmrBase}/events`,\n  }\n}\n\nfunction createHmrClientResponse(eventPathname: string, method: string): Response {\n  return new Response(method === 'HEAD' ? null : createHmrClientSource({ eventPathname }), {\n    headers: {\n      'Cache-Control': 'no-cache',\n      'Content-Type': 'application/javascript; charset=utf-8',\n    },\n  })\n}\n\nfunction assertBrowserEventUrl(url: string | undefined): asserts url is string {\n  if (url === undefined) {\n    throw new TypeError('hmr must be provided')\n  }\n}\n\nfunction createHmrPayloadSender(): (payload: HmrPayload) => void {\n  return () => {}\n}\n\nfunction createBrowserHmrEvent(\n  payload: Extract<HmrPayload, { type: 'browser:reload' | 'browser:update' }>,\n  files: readonly string[],\n): BrowserHmrEvent {\n  if (payload.type === 'browser:reload') {\n    return {\n      ...(files.length === 0 ? {} : { files: [...files] }),\n      type: 'reload',\n    }\n  }\n","sourceCodeStart":904,"sourceCodeEnd":940,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/assets/src/lib/asset-server.ts#L904-L940","documentation":"`--verbose` adds extra decoration to the human-readable routes output and is incompatible with `--json`, which must stay machine-parseable. The parser rejects the pair at parse time.","triggerScenarios":"Running `remix routes --json --verbose` — both flags truthy in `parseRoutesCommandArgs`.","commonSituations":"Scripts that used `--verbose` and later gained `--json`; wanting extra detail in JSON output and assuming verbose applies.","solutions":["Drop `--verbose` when using `--json`","If you need more data in JSON, the JSON output already includes full route info — parse it directly","Remove stale flags from shared scripts"],"exampleFix":"# before\nremix routes --json --verbose\n# after\nremix routes --json","handlingStrategy":"validation","validationCode":"let args = ['remix','routes'];\nif (json) args.push('--json');\nelse if (verbose) args.push('--verbose'); // mutually exclusive by construction","typeGuard":"function isValidRoutesFlags(f: { json?: boolean; verbose?: boolean }): boolean {\n  return !(f.json && f.verbose);\n}","tryCatchPattern":null,"preventionTips":["Treat --json as machine mode; skip human-oriented flags","Audit accumulated script flags"],"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"}