saadeghi/daisyui · error · Error
Browser executable not found or not executable: ${configured
Error message
Browser executable not found or not executable: ${configured} What it means
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.
Source
Thrown at packages/tailwind-play-share/index.mjs:216
if (await isExecutable(filePath)) return filePath
}
}
return undefined
}
async function findBrowser(explicitBrowser) {
const configured =
explicitBrowser ??
process.env.TAILWIND_PLAY_BROWSER ??
process.env.CHROME_PATH ??
process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH ??
process.env.PUPPETEER_EXECUTABLE_PATH
if (configured) {
const executable = await resolveExecutable(configured)
if (!executable) {
throw new Error(`Browser executable not found or not executable: ${configured}`)
}
return executable
}
const platformCandidates = {
darwin: [
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
"/Applications/Chromium.app/Contents/MacOS/Chromium",
"/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary",
"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
],
linux: [
"google-chrome",
"google-chrome-stable",
"chromium",
"chromium-browser",
"microsoft-edge",
],View on GitHub (pinned to 42b09e637e)
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.
Example fix
# before TAILWIND_PLAY_BROWSER=/opt/old/chrome bun .../index.mjs --html '<div/>' # after unset TAILWIND_PLAY_BROWSER && bun .../index.mjs --html '<div/>' # or bun .../index.mjs --browser "$(command -v google-chrome)" --html '<div/>'
Defensive patterns
Strategy: validation
Validate before calling
import { access, constants } from 'node:fs/promises'
async function isExecutable(p) {
try { await access(p, process.platform === 'win32' ? constants.F_OK : constants.X_OK); return true } catch { return false }
}
if (configured && !(await isExecutable(configured))) {
throw new Error(`Browser executable not found or not executable: ${configured}`)
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Chrome or Chromium was not found. Set TAILWIND_PLAY_BROWSER
- Could not start the browser: ${spawnError.message}
- Browser exited before starting (exit code ${browserProcess.e
- Timed out while starting Chrome's DevTools server
- ${error.message}\n${details}
AI-assisted analysis of saadeghi/daisyui@42b09e637e (2026-08-13).
Data as JSON: /api/errors/5c9003545a8b761a.
Report an issue: GitHub.