saadeghi/daisyui · warning · Error
No changed component CSS files were found between the suppli
Error message
No changed component CSS files were found between the supplied commits
What it means
Thrown by buildPreviewInputs when, after diffing base..head over packages/daisyui/src/components and planning the changes, plan.excludeNames is empty - i.e. no component CSS file was added/modified/deleted/renamed/copied between the two commits.
Source
Thrown at packages/tailwind-play-share/pr-preview.mjs:502
.join("\n\n")
return `${plugin}\n${changedCss ? `\n${changedCss}\n` : ""}`
}
export function buildPreviewInputs(baseSha, headSha) {
const diff = git([
"diff",
"--name-status",
"--find-renames",
"-z",
baseSha,
headSha,
"--",
"packages/daisyui/src/components",
])
const changes = parseNameStatus(diff)
const plan = planComponentChanges(changes)
if (plan.excludeNames.length === 0) {
throw new Error("No changed component CSS files were found between the supplied commits")
}
const cssFiles = plan.headCssPaths.map((filePath) => {
const css = readFileAtRevision(headSha, filePath)
assertSafePrCss(css, filePath)
return { componentName: componentNameFromPath(filePath), css }
})
const headDocs = buildDocsIndex(headSha)
const baseDocs = buildDocsIndex(baseSha)
const pagesByPath = new Map()
for (const target of plan.docsTargets) {
const preferred = target.preferredCssFilename && headDocs.get(target.preferredCssFilename)
const fallback = target.fallbackCssFilename && baseDocs.get(target.fallbackCssFilename)
const pages = preferred?.length ? preferred : fallback
if (!pages?.length) {
const cssFilename = target.preferredCssFilename ?? target.fallbackCssFilenameView on GitHub (pinned to 42b09e637e)
Solutions
- Confirm the PR actually changes a file under packages/daisyui/src/components/*.css.
- Verify base and head SHAs are distinct and in the right order (base is the older commit).
- Run `git diff --name-only BASE HEAD -- packages/daisyui/src/components` to see what changed.
- Skip preview generation for PRs with no component CSS changes.
Example fix
# before pr-preview --base-sha $HEAD --head-sha $BASE --output out.json # after pr-preview --base-sha $BASE --head-sha $HEAD --output out.json git diff --name-only $BASE $HEAD -- packages/daisyui/src/components # sanity check
Defensive patterns
Strategy: validation
Validate before calling
import { execSync } from "node:child_process"
function hasComponentCssChanges(baseSha, headSha) {
const out = execSync(`git diff --name-only ${baseSha} ${headSha} -- packages/daisyui/src/components`, { encoding: "utf8" })
return out.trim().length > 0
}
if (!hasComponentCssChanges(baseSha, headSha)) {
throw new Error("No component CSS changes; skip preview generation")
} Try / catch
try {
await generatePrPreview({ baseSha, headSha, output })
} catch (error) {
if (error.message === "No changed component CSS files were found between the supplied commits") {
// skip the preview job for this PR - it has no component CSS changes
}
throw error
} Prevention
- Gate the preview job on `git diff --name-only` touching packages/daisyui/src/components.
- Pass distinct SHAs with base older than head.
- Skip preview generation for docs/test-only PRs.
When it happens
Trigger: git diff --name-status --find-renames -z BASE HEAD -- packages/daisyui/src/components yields no component CSS changes, so planComponentChanges produces an empty excludeNames set and the guard fires.
Common situations: Running pr-preview on a PR that changes only docs, tests, or non-component source, passing the same SHA for both base and head, swapped base/head SHAs, or a PR whose component changes are outside packages/daisyui/src/components.
Related errors
- Unsafe PR CSS in ${filePath}: ${reason}
- No component docs page maps to ${cssFilename}
- --base-sha is required
- --head-sha is required
- --timeout must be a positive number of milliseconds
AI-assisted analysis of saadeghi/daisyui@42b09e637e (2026-08-13).
Data as JSON: /api/errors/1b3cbeffcc6d8ac3.
Report an issue: GitHub.