Repository navigation
Description
Tailwind CSS 4.3.1 hangs during source discovery in fresh Docus project
Description
I'm seeing a startup/build hang when using the latest Docus project with Tailwind CSS 4.3.1.
The issue occurs on a fresh project generated by Docus and appears to hang indefinitely during Tailwind source scanning.
Downgrading Tailwind from 4.3.1 to 4.3.0 immediately resolves the issue.
Environment
- macOS
- Node.js v22.x and v24.x (reproduced on both)
- Docus 5.12.2
- Nuxt 4.4.8
- @nuxt/ui 4.9.0
- Tailwind CSS 4.3.1
Dependency tree:
[email protected]
├── @nuxt/[email protected]
└── [email protected]
[email protected]Reproduction
Create a fresh Docus project:
npx create-docus@latest docus-test
cd docus-test
npm install
npm run devor
npm run buildActual Behavior
The process hangs indefinitely.
The last lines in the Tailwind debug log are:
INFO discover_sources: tailwindcss_oxide::scanner: enter
INFO discover_sources:walk_synchronous: tailwindcss_oxide::scanner: enter
No further progress is made.
The Nuxt application never becomes available.
Tailwind Debug Output
Source: PublicSourceEntry { base: "/Users/<user>/docus-test", pattern: "**/*", negated: false }
...
Source: PublicSourceEntry { base: "/Users/<user>/docus-test", pattern: "../../app.config.ts", negated: false }
...
Source: Pattern { base: "/Users", pattern: "/app.config.ts" }
INFO discover_sources: tailwindcss_oxide::scanner: enter
INFO discover_sources:walk_synchronous: tailwindcss_oxide::scanner: enter
Workarounds
1. Downgrade Tailwind to 4.3.0
{
"overrides": {
"tailwindcss": "4.3.0",
"@tailwindcss/node": "4.3.0",
"@tailwindcss/postcss": "4.3.0",
"@tailwindcss/vite": "4.3.0"
}
}After reinstalling dependencies, the project starts normally.
2. Remove this source entry
Docus generates:
@source "../../app.config.ts";from:
node_modules/docus/modules/css.tsRemoving that source entry also allows the application to start.
Additional Notes
The issue is reproducible on:
- Node.js 22
- Node.js 24
The issue occurs on a completely fresh Docus installation with no custom code.
Based on the behavior, it seems related to source discovery/scanning in Tailwind 4.3.1, possibly involving the handling of:
@source "../../app.config.ts";or path normalization during source scanning.
Please let me know if I can provide additional logs or test a patched build.
Click to expand error log
tailwindcss-7985.log
2026-06-18T08:34:44.969937Z INFO tailwindcss_oxide::scanner: Provided sources:
2026-06-18T08:34:44.970136Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/fachrihilmi/docus-test", pattern: "**/*", negated: false }
2026-06-18T08:34:44.970270Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/fachrihilmi/docus-test/.nuxt", pattern: "/Users/fachrihilmi/docus-test/**/*", negated: false }
2026-06-18T08:34:44.970276Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/fachrihilmi/docus-test/.nuxt", pattern: "/Users/fachrihilmi/docus-test/node_modules/docus/app/**/*", negated: false }
2026-06-18T08:34:44.970279Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/fachrihilmi/docus-test/.nuxt", pattern: "./ui", negated: false }
2026-06-18T08:34:44.970283Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/fachrihilmi/docus-test/node_modules/@nuxt/ui/dist/runtime", pattern: "./components", negated: false }
2026-06-18T08:34:44.970287Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/fachrihilmi/docus-test", pattern: "/Users/fachrihilmi/docus-test/content/**/*", negated: false }
2026-06-18T08:34:44.970291Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/fachrihilmi/docus-test", pattern: "/Users/fachrihilmi/docus-test/node_modules/docus/app/**/*", negated: false }
2026-06-18T08:34:44.970294Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/fachrihilmi/docus-test", pattern: "../../app.config.ts", negated: false }
2026-06-18T08:34:44.970298Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/fachrihilmi/docus-test", pattern: "/Users/fachrihilmi/docus-test/node_modules/docus/modules/assistant/**/*", negated: false }
2026-06-18T08:34:44.976869Z INFO tailwindcss_oxide::scanner: Optimized sources:
2026-06-18T08:34:44.976879Z INFO tailwindcss_oxide::scanner: Source: Auto { base: "/Users/fachrihilmi/docus-test" }
2026-06-18T08:34:44.976916Z INFO tailwindcss_oxide::scanner: Source: Auto { base: "/Users/fachrihilmi/docus-test" }
2026-06-18T08:34:44.976920Z INFO tailwindcss_oxide::scanner: Source: External { base: "/Users/fachrihilmi/docus-test/node_modules/docus/app" }
2026-06-18T08:34:44.976950Z INFO tailwindcss_oxide::scanner: Source: External { base: "/Users/fachrihilmi/docus-test/.nuxt/ui" }
2026-06-18T08:34:44.976954Z INFO tailwindcss_oxide::scanner: Source: External { base: "/Users/fachrihilmi/docus-test/node_modules/@nuxt/ui/dist/runtime/components" }
2026-06-18T08:34:44.976958Z INFO tailwindcss_oxide::scanner: Source: Auto { base: "/Users/fachrihilmi/docus-test/content" }
2026-06-18T08:34:44.976962Z INFO tailwindcss_oxide::scanner: Source: External { base: "/Users/fachrihilmi/docus-test/node_modules/docus/app" }
2026-06-18T08:34:44.976965Z INFO tailwindcss_oxide::scanner: Source: Pattern { base: "/Users", pattern: "/app.config.ts" }
2026-06-18T08:34:44.977005Z INFO tailwindcss_oxide::scanner: Source: External { base: "/Users/fachrihilmi/docus-test/node_modules/docus/modules/assistant" }
2026-06-18T08:34:44.982972Z INFO discover_sources: tailwindcss_oxide::scanner: enter
2026-06-18T08:34:44.982987Z INFO discover_sources:walk_synchronous: tailwindcss_oxide::scanner: enter
Activity
RobinMalfait commentedon Jun 18, 2026
Do you really have an
app.config.tsfile in the/Usersfolder?fachrihr commentedon Jun 18, 2026
@RobinMalfait No, there is no /Users/app.config.ts file on my machine.
My project is located at:
/Users/fachrihilmi/docus-testand there is no app.config.ts file directly under /Users.
The reason I mentioned /Users/app.config.ts is because Tailwind's debug log shows:
which surprised me as well. I expected the source to resolve relative to the project directory instead.
I also tested creating a valid
app.config.tsin the project root:After doing that, the behavior changed:
So creating app.config.ts changed the execution path, but did not fully resolve the issue.
The most reliable workaround so far is still:
Also, Tailwind debug output still shows:
which is why I was wondering whether the path normalization behavior changed in 4.3.1.
RobinMalfait commentedon Jun 18, 2026
Yeah I see. This looks like a Docus bug, because from Tailwind CSS's perspective this makes sense. The issue is that you're now scanning the
/Usersfolder. We can probably tighten that, but it's still a Docus bug.Weirdly enough I don't see that
@sourcedirective at all.But I do see it in the debug logs. If you take a look at the debug logs for Tailwind CSS v4.3.0, you'll see this:
But in Tailwind CSS v4.3.1 this is optimized a bit further, which should point to the exact same folder:
In both situations you're looking at an
app.config.tsfile that lives in the/Usersfolder which doesn't seem correct.It did change slightly, because we had a bug where a path that was explicitly included via
@sourcewasn't being used. Also some fixes related to@sourcewith symlinks. Some related PRs:@sourceglobs with symlinks are preserved #20203@sourcewith folders that are ignored #20214@sourceglobs ending in**/*preserve dynamic path segments to avoid scanning too many files #20217Update eslint 9.37.0 → 9.39.1 (minor) (tailwindlabs#19287)
RobinMalfait commentedon Jun 18, 2026
Alright, while I believe that this is a bug in Docus, because that path is wrong.
It also exposed a bug on our side because even if you have a path that resolves to
{ base: "/Users", pattern: "/app.config.ts" }it should not scan the entire/Usersfolder but instead only look forapp.config.tsfiles.Working on a fix here and got some promising results:
Before:
After:
That's a ~1100x performance increase.
fachrihr commentedon Jun 19, 2026
Thanks for digging into this.
That makes sense. It sounds like there are actually two separate issues:
/Users/app.config.ts, which doesn't seem intended.The performance fix sounds very promising and would explain why downgrading to 4.3.0 or removing the
@source "../../app.config.ts"entry avoids the issue on my machine.I'll open an issue on the Docus side as well and link back to this discussion so they can investigate why that source path resolves outside the project root.
Thanks for looking into it and for working on the scanner fix.
RobinMalfait commentedon Jun 19, 2026
Hey! This should be fixed by #20263, and will be available in the next release.
You can already try it by using the insiders build:
CLI:
PostCSS:
Vite:
webpack:
Restrict walking sibling folders when using a pattern (tailwindlabs#2…