{"record":{"id":"cbd6a043a54b59a0","repo":"saadeghi/daisyui","slug":"use-either-css-or-css-file-not-both","errorCode":null,"errorMessage":"Use either --css or --css-file, not both","messagePattern":"Use either --css or --css-file, not both","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwind-play-share/index.mjs","lineNumber":114,"sourceCode":"        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\nasync function readStdin() {\n  let input = \"\"\n  for await (const chunk of process.stdin) {","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/saadeghi/daisyui/blob/42b09e637e09467aa54a813a5aea53c1179aec75/packages/tailwind-play-share/index.mjs#L96-L132","documentation":"CSS may be supplied either inline (--css) or from a file (--css-file), but not both. Mirrors the HTML mutual-exclusion rule.","triggerScenarios":"Passing `--css '<code>' --css-file path.css` together in one invocation.","commonSituations":"Wrapper that always injects a default --css while the user also passes --css-file; copy-paste accumulation.","solutions":["Remove one of the two flags.","Pick the inline or file form and use it consistently for CSS."],"exampleFix":"# before\nbun .../index.mjs --css '@import \"tailwindcss\";' --css-file styles.css\n# after\nbun .../index.mjs --css-file styles.css","handlingStrategy":"validation","validationCode":"if (options.css !== undefined && options.cssFile !== undefined) {\n  throw new Error('Use either --css or --css-file, not both')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pick one CSS input form per invocation.","Audit wrapper scripts that inject default --css 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"}