Skip to content

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

Closed

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:

export default {
  plugins: {
    '@tailwindcss/postcss': {},
    autoprefixer: {},
  },
}

The root package.json declares tailwindcss and autoprefixer, but not @tailwindcss/postcss and not postcss. 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-starter does 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

Activity

  1. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    Findings triage: promoted with the delete direction — finding → pm:queue.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. self-assigned this
    on Aug 11, 2026
  3. yinlianghui commented on Aug 11, 2026

    @yinlianghui
    CollaboratorAuthor

    CLAIM(与 #4066 并卡,按 triage 的"一 dev 两卡"建议) — session session_017Qqyix2QcnpUC9XeYVDzx3,dispatching now。Branch: claude/issue-4065-4066-dead-tailwind-configs。本卡方向按 triage 裁定执行:删 root postcss.config.mjs,不加两个 devDependencies(vestigial 已被机械论证:root 无 CSS 源、所有构建走 per-package filter、任何可能的消费者都会在第一个不可解析插件上先炸)。#4066 的两个 tailwind.config.* 按 measure-then-delete(先核对 theme.extend 是否有 CSS 入口未覆盖的真实设置,有则移植 @theme,再删)。一 PR 双关。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions