{"record":{"id":"380158a934598883","repo":"saadeghi/daisyui","slug":"timeout-must-be-a-positive-number-of-millisecond","errorCode":null,"errorMessage":"--timeout must be a positive number of milliseconds","messagePattern":"--timeout must be a positive number of milliseconds","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwind-play-share/index.mjs","lineNumber":82,"sourceCode":"        options.css = takeValue(argv, index, argument)\n        index += 1\n        break\n      case \"--html-file\":\n        options.htmlFile = takeValue(argv, index, argument)\n        index += 1\n        break\n      case \"--css-file\":\n        options.cssFile = takeValue(argv, index, argument)\n        index += 1\n        break\n      case \"--browser\":\n        options.browser = takeValue(argv, index, argument)\n        index += 1\n        break\n      case \"--timeout\": {\n        const timeout = Number(takeValue(argv, index, argument))\n        if (!Number.isFinite(timeout) || timeout <= 0) {\n          throw new Error(\"--timeout must be a positive number of milliseconds\")\n        }\n        options.timeoutMs = timeout\n        index += 1\n        break\n      }\n      case \"--headed\":\n        options.headed = true\n        break\n      case \"--verbose\":\n        options.verbose = true\n        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","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/saadeghi/daisyui/blob/42b09e637e09467aa54a813a5aea53c1179aec75/packages/tailwind-play-share/index.mjs#L64-L100","documentation":"The --timeout value is run through Number() and must be finite and strictly greater than zero, or the script rejects it. It is interpreted as milliseconds for each browser operation.","triggerScenarios":"Passing `--timeout 0`, a negative number, a non-numeric string like `abc`, an empty string, or `Infinity`/`NaN`.","commonSituations":"Passing the timeout in seconds (e.g. 45) instead of milliseconds (45000); passing 0 hoping to disable the timeout; trailing units like `45s`.","solutions":["Pass a positive integer number of milliseconds (e.g. 45000).","If you want a longer ceiling under load, raise the value rather than zeroing it.","Drop any unit suffix; the flag expects a bare number."],"exampleFix":"# before\nbun .../index.mjs --timeout 45 --html '<div/>'\n# after\nbun .../index.mjs --timeout 45000 --html '<div/>'","handlingStrategy":"validation","validationCode":"const rawTimeout = /* the --timeout value */\nconst n = Number(rawTimeout)\nif (!Number.isFinite(n) || n <= 0) {\n  throw new Error('--timeout must be a positive number of milliseconds')\n}\n// pass n as milliseconds","typeGuard":"const isPositiveMillis = (v) => Number.isFinite(Number(v)) && Number(v) > 0","tryCatchPattern":null,"preventionTips":["Express timeouts in milliseconds, not seconds.","Do not use 0 to mean 'no limit'; raise the value instead.","Drop unit suffixes like 's' or 'ms'."],"tags":["cli","argument","timeout","validation"],"backgroundTag":null,"analyzedSha":"42b09e637e09467aa54a813a5aea53c1179aec75","analyzedAt":"2026-08-13T04:10:09.555Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}