Skip to content

feat: nuxt doctor with hook-based architecture #1205

Closed as duplicate
Closed as duplicate

Description

@onmax

Motivation

Related to #330. After some research, the original dependency-checking scope is mostly addressed by nuxt upgrade --dedupe. But there's an interesting opportunity here:

A hook-based nuxt doctor command where the CLI provides core checks and exposes a doctor:check hook for modules to contribute their own.

Example output

$ nuxt doctor

[✓] Config - validated against schema
[✓] Versions - Nuxt 3.15.0, Node 20.10.0
[!] Modules (via nuxt-care) - @old/module 45/100 ⚠
[✓] A11y (via @nuxt/a11y) - 0 violations

Core checks (built-in)

  • config validation against @nuxt/schema
  • Node/Nuxt version checks
  • module compatibility

Hook for modules

nuxt.hook('doctor:check', (ctx) => {
  ctx.addCheck({ name: 'My Check', status: 'success', message: '...' })
})

This would allow modules like @nuxt/a11y to contribute a11y violation checks, nuxt-care module to report module health scores.

Implementation

The pattern follows analyze.ts which calls the build:analyze:done hook.

Component Location
Hook type @nuxt/schema (PR to nuxt/nuxt)
Command packages/nuxi/src/commands/doctor.ts

Open questions

  • should hooks run in parallel or sequentially?
  • for module checks that need the dev server (like a11y), would a separate --full flag make sense?

I'd love feedback before starting implementation 🙏

Activity

  1. changed the title [-]feat: nuxt doctor with hook-based architecture[/-] [+]feat: `nuxt doctor` with hook-based architecture[/+] on Jan 31, 2026
  2. danielroe commented on Jul 25, 2026

    @danielroe
    Member

    let's track in #330

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

Metadata

Metadata

Assignees

No one assigned

    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