Skip to content

Root postcss.config.mjs names two plugins the repo root can neither resolve nor declare (@tailwindcss/postcss, postcss) #4065

Description

@yinlianghui

Out-of-scope finding from implementing #3891 (PR #4064). Not fixed there — #3891's declared surface is packages/cli/src/commands/doctor.ts only. Surfaced by the fixed objectui doctor, which is how it was noticed.

Fact (verified on origin/main @ 11c1e71, in a fresh worktree after pnpm install)

The repo-root postcss.config.mjs registers two plugins:

exportdefault{plugins: {'@tailwindcss/postcss': {},autoprefixer: {},},}

The root package.json declares tailwindcss and autoprefixer, but not@tailwindcss/postcss and notpostcss. Under pnpm's isolated node_modules neither is reachable from the root either. Measured with Node's own resolver from the root package.json:

tailwindcss declared:^4.3.3 resolvable
@tailwindcss/postcss declared:- UNRESOLVABLE
autoprefixer declared:^10.5.4 resolvable
postcss declared:- UNRESOLVABLE

So if any tool run at the repo root discovers this config, loading it fails at the first plugin. The fixed objectui doctor reports exactly that when run at the root:

x Tailwind CSS 4 needs @tailwindcss/postcss, which is neither declared nor
installed here. ...

Counter-probe that the measurement is sound: the same resolver call from apps/console and examples/console-starterdoes resolve @tailwindcss/postcss (to node_modules/.pnpm/@tailwindcss+postcss@4.3.3/...), because those packages declare it. Only the root is short.

Why this is filed as observation-class

Every app and package that actually builds CSS carries its own postcss.config.* next to its sources (apps/console, apps/site, packages/components, packages/runner, examples/* — 7 in total including this one) and declares the plugin, so PostCSS discovery normally stops before reaching the root. No build is failing today. What is unclear — and worth a maintainer's judgement rather than mine — is whether the root config is vestigial (nothing has ever consumed it, in which case deleting it is the fix) or a latent trap (some tool run from the root would pick it up, in which case the two missing devDependencies are the fix). I did not chase which, because deciding it is outside #3891.

Note the two are not interchangeable fixes: deleting the file and adding the dependencies lead to different end states, and the right one depends on that consumption question.

Search performed

Open issues in this repo, three passes: postcss config root autoprefixer (0 hits), tailwindcss postcss (#3891, #4062, #3892, #3883, #3884 — all different surfaces: doctor, the init scaffold, docs pages), tailwind.config (#3883, #3891). Nothing covers the root postcss.config.mjs.


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions