Skip to content

Tailwind CSS 4.3.1 hangs in source scanner with @source "../../app.config.ts" used by Docus #20255

Closed

Description

@fachrihr

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:

Reproduction

Create a fresh Docus project:

npx create-docus@latest docus-test
cd docus-test

npm install
npm run dev

or

npm run build

Actual 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.ts

Removing 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

  1. self-assigned this
    on Jun 18, 2026
  2. RobinMalfait commented on Jun 18, 2026

    @RobinMalfait
    Contributor

    Do you really have an app.config.ts file in the /Users folder?

  3. fachrihr commented on Jun 18, 2026

    @fachrihr
    Author

    @RobinMalfait No, there is no /Users/app.config.ts file on my machine.

    My project is located at:

    /Users/fachrihilmi/docus-test

    and 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:

    Source: Pattern { base: "/Users", pattern: "/app.config.ts" }
    

    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.ts in the project root:

    export default defineAppConfig({})

    After doing that, the behavior changed:

    • Tailwind no longer appeared to hang during source discovery.
    • The build progressed further and reached Rollup/Nitro.
    • However, the application still did not start successfully.

    So creating app.config.ts changed the execution path, but did not fully resolve the issue.

    The most reliable workaround so far is still:

    • Downgrade Tailwind from 4.3.1 to 4.3.0, or
    • Remove @source "../../app.config.ts" from Docus' generated CSS.

    Also, Tailwind debug output still shows:

    Source: Pattern { base: "/Users", pattern: "/app.config.ts" }
    

    which is why I was wondering whether the path normalization behavior changed in 4.3.1.

  4. RobinMalfait commented on Jun 18, 2026

    @RobinMalfait
    Contributor

    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 /Users folder. We can probably tighten that, but it's still a Docus bug.

    Weirdly enough I don't see that @source directive at all.

    @source "/Users/robin/docus-test/**/*";
    @source "/Users/robin/docus-test/node_modules/docus/app/**/*";
    @source inline("isolate");
    @source "./ui";

    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:

    INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/robin/docus-test/.nuxt", pattern: "./ui", negated: false }
    …
    INFO tailwindcss_oxide::scanner: Source: Pattern { base: "/Users/robin/docus-test", pattern: "../../app.config.ts" }
    

    But in Tailwind CSS v4.3.1 this is optimized a bit further, which should point to the exact same folder:

    INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/robin/docus-test", pattern: "../../app.config.ts", negated: false }
    …
    INFO tailwindcss_oxide::scanner: Source: Pattern { base: "/Users", pattern: "/app.config.ts" }
    

    In both situations you're looking at an app.config.ts file that lives in the /Users folder which doesn't seem correct.

    which is why I was wondering whether the path normalization behavior changed in 4.3.1.

    It did change slightly, because we had a bug where a path that was explicitly included via @source wasn't being used. Also some fixes related to @source with symlinks. Some related PRs:

  5. RobinMalfait commented on Jun 18, 2026

    @RobinMalfait
    Contributor

    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 /Users folder but instead only look for app.config.ts files.

    Working on a fix here and got some promising results:

    Before:

    ❯ tw -i index.css -o out.css
    ≈ tailwindcss v4.3.1
    
    Done in 22s
    

    After:

    ❯ tw -i index.css -o out.css
    ≈ tailwindcss v4.3.1
    
    Done in 20ms
    

    That's a ~1100x performance increase.

  6. fachrihr commented on Jun 19, 2026

    @fachrihr
    Author

    Thanks for digging into this.

    That makes sense. It sounds like there are actually two separate issues:

    1. Docus is producing a source path that ultimately resolves to /Users/app.config.ts, which doesn't seem intended.
    2. Tailwind ends up doing an unexpectedly expensive scan for that path, causing the startup/build to appear hung.

    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.

  7. RobinMalfait commented on Jun 19, 2026

    @RobinMalfait
    Contributor

    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:

    npm install tailwindcss@insiders @tailwindcss/cli@insiders

    PostCSS:

    npm install tailwindcss@insiders @tailwindcss/postcss@insiders

    Vite:

    npm install tailwindcss@insiders @tailwindcss/vite@insiders

    webpack:

    npm install tailwindcss@insiders @tailwindcss/webpack@insiders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions