{"record":{"id":"5c9003545a8b761a","repo":"saadeghi/daisyui","slug":"browser-executable-not-found-or-not-executable","errorCode":null,"errorMessage":"Browser executable not found or not executable: ${configured}","messagePattern":"Browser executable not found or not executable: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwind-play-share/index.mjs","lineNumber":216,"sourceCode":"      if (await isExecutable(filePath)) return filePath\n    }\n  }\n\n  return undefined\n}\n\nasync function findBrowser(explicitBrowser) {\n  const configured =\n    explicitBrowser ??\n    process.env.TAILWIND_PLAY_BROWSER ??\n    process.env.CHROME_PATH ??\n    process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH ??\n    process.env.PUPPETEER_EXECUTABLE_PATH\n\n  if (configured) {\n    const executable = await resolveExecutable(configured)\n    if (!executable) {\n      throw new Error(`Browser executable not found or not executable: ${configured}`)\n    }\n    return executable\n  }\n\n  const platformCandidates = {\n    darwin: [\n      \"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\",\n      \"/Applications/Chromium.app/Contents/MacOS/Chromium\",\n      \"/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary\",\n      \"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge\",\n    ],\n    linux: [\n      \"google-chrome\",\n      \"google-chrome-stable\",\n      \"chromium\",\n      \"chromium-browser\",\n      \"microsoft-edge\",\n    ],","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/saadeghi/daisyui/blob/42b09e637e09467aa54a813a5aea53c1179aec75/packages/tailwind-play-share/index.mjs#L198-L234","documentation":"findBrowser honours an explicit browser path (--browser, or env vars TAILWIND_PLAY_BROWSER / CHROME_PATH / PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH / PUPPETEER_EXECUTABLE_PATH in that priority). When one of those is set, it must resolve to an executable; resolveExecutable returns undefined and findBrowser throws.","triggerScenarios":"Passing `--browser /no/such/chrome`; TAILWIND_PLAY_BROWSER pointing at a path that does not exist or lacks execute permission; a bare name not found on PATH.","commonSituations":"Stale env var from a previous setup; browser uninstalled/moved; path correct but file not chmod +x; container where PATH lacks the browser bin directory.","solutions":["Verify the path exists and is executable: `test -x \"$path\"`.","Unset the env var to let the script autodetect platform defaults.","Reinstall Chrome/Chromium or point to the real binary location."],"exampleFix":"# before\nTAILWIND_PLAY_BROWSER=/opt/old/chrome bun .../index.mjs --html '<div/>'\n# after\nunset TAILWIND_PLAY_BROWSER && bun .../index.mjs --html '<div/>'\n# or\nbun .../index.mjs --browser \"$(command -v google-chrome)\" --html '<div/>'","handlingStrategy":"validation","validationCode":"import { access, constants } from 'node:fs/promises'\nasync function isExecutable(p) {\n  try { await access(p, process.platform === 'win32' ? constants.F_OK : constants.X_OK); return true } catch { return false }\n}\nif (configured && !(await isExecutable(configured))) {\n  throw new Error(`Browser executable not found or not executable: ${configured}`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Point TAILWIND_PLAY_BROWSER / CHROME_PATH / --browser at a real binary.","Confirm with `test -x \"$path\"` before running.","Unset stale env vars when the browser moves."],"tags":["browser","environment","path","chrome"],"backgroundTag":null,"analyzedSha":"42b09e637e09467aa54a813a5aea53c1179aec75","analyzedAt":"2026-08-13T04:10:09.555Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}