{"record":{"id":"d24cf48f218bda40","repo":"saadeghi/daisyui","slug":"use-either-html-or-html-file-not-both","errorCode":null,"errorMessage":"Use either --html or --html-file, not both","messagePattern":"Use either --html or --html-file, not both","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwind-play-share/index.mjs","lineNumber":111,"sourceCode":"        break\n      case \"--help\":\n      case \"-h\":\n        options.help = true\n        break\n      case \"--\":\n        positional.push(...argv.slice(index + 1))\n        index = argv.length\n        break\n      default:\n        if (argument.startsWith(\"-\")) {\n          throw new Error(`Unknown option: ${argument}`)\n        }\n        positional.push(argument)\n    }\n  }\n\n  if (options.html !== undefined && options.htmlFile !== undefined) {\n    throw new Error(\"Use either --html or --html-file, not both\")\n  }\n  if (options.css !== undefined && options.cssFile !== undefined) {\n    throw new Error(\"Use either --css or --css-file, not both\")\n  }\n\n  if (options.html === undefined && options.htmlFile === undefined && positional.length > 0) {\n    options.html = positional.shift()\n  }\n  if (options.css === undefined && options.cssFile === undefined && positional.length > 0) {\n    options.css = positional.shift()\n  }\n  if (positional.length > 0) {\n    throw new Error(\"Too many positional arguments\")\n  }\n\n  return options\n}\n","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/saadeghi/daisyui/blob/42b09e637e09467aa54a813a5aea53c1179aec75/packages/tailwind-play-share/index.mjs#L93-L129","documentation":"HTML may be supplied either inline (--html) or from a file (--html-file), but not both. After parsing, if both options are set the script throws rather than guessing precedence.","triggerScenarios":"Passing `--html '<code>' --html-file path.html` together in one invocation.","commonSituations":"Leftover flags from a previous run pasted back in; a wrapper script appends a default --html while the user also passes --html-file.","solutions":["Remove one of the two flags.","Use --html-file when the content is large, --html for short inline snippets."],"exampleFix":"# before\nbun .../index.mjs --html '<div/>' --html-file page.html\n# after\nbun .../index.mjs --html-file page.html","handlingStrategy":"validation","validationCode":"if (options.html !== undefined && options.htmlFile !== undefined) {\n  throw new Error('Use either --html or --html-file, not both')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pick one HTML input form per invocation.","Audit wrapper scripts that inject default --html values.","Clear stale flags when reusing a command history."],"tags":["cli","argument","conflict"],"backgroundTag":null,"analyzedSha":"42b09e637e09467aa54a813a5aea53c1179aec75","analyzedAt":"2026-08-13T04:10:09.555Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}