vitejs / vitejs/devtools

devtools-kit 0.3.x pins devframe@0.5.4 with stale nostics@^0.2.0, breaking Nuxt 4.5 prerender (defineProdDiagnostics missing)

Open
#445 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.2k
Forks
89
Avg merge
18h 46m
Merged PRs (30d)
24

Description

Describe the bug

@vitejs/devtools-kit@0.3.x (latest of that line: 0.3.4) depends on devframe@^0.5.4, and devframe@0.5.4 still declares nostics@^0.2.0. Every other package in a modern Nuxt tree (nuxt@4.5.0, @nuxt/kit, @nuxt/schema, vue-router, and @vitejs/devtools-kit itself) requires nostics@^1.1.4.

nostics@0.2.0 and nostics@1.x have completely different APIs, so whichever copy npm hoists to the root of node_modules breaks the other consumer. In our case a conservative lockfile update (Dependabot bumping nuxt 4.4.8 → 4.5.0 in place) kept nostics@0.2.0 hoisted at root, and Nitro's externals resolution picked it up at prerender time:

SyntaxError: The requested module 'node_modules/nostics/dist/index.mjs'
does not provide an export named 'defineProdDiagnostics'

→ every prerendered route returns 500 and nuxt build exits 1.

Failing CI run (public): https://github.com/seyken971/pxlc-nuxt/actions/runs/29714114498

Dependency chain
@nuxtjs/seo@5.3.3
└─ nuxt-seo-utils@8.3.2
   └─ @unhead/bundler@3.2.1        (pins @vitejs/devtools-kit@^0.3.4)
      └─ @vitejs/devtools-kit@0.3.4
         ├─ devframe@0.5.4          → nostics@^0.2.0   ⚠ stale
         ├─ @devframes/hub@0.5.4    → nostics@^0.2.0   ⚠ stale
         └─ nostics@^1.1.4

devframe@0.6.0+ already moved to nostics@^1.1.4, and @vitejs/devtools-kit@0.4.0+ already bumped to devframe@^0.6.0 — so the head of the tree is fixed. But there is no devframe@0.5.5 and no @vitejs/devtools-kit@0.3.5, so every consumer pinned to the 0.3.x line (notably @unhead/bundler@3.2.1, i.e. the whole current @nuxtjs/seo → Nuxt ecosystem) keeps re-introducing nostics@0.2.0 into fresh installs.

Suggested fix

Either of:

  • publish @vitejs/devtools-kit@0.3.5 bumping devframe/@devframes/hub to a nostics@^1.1.4-compatible release, or
  • publish devframe@0.5.5 / @devframes/hub@0.5.5 with nostics@^1.1.4 (semver-satisfies the existing ^0.5.4 pins, no devtools-kit release needed — happy to file this in devframes/devframe instead if that repo is the better home).
Workaround

Regenerating the lockfile from scratch (rm package-lock.json && npm install) hoists nostics@1.2.0 to root and nests 0.2.0 under devframe, which unbreaks Nitro. But any conservative/in-place lock update can flip it back.

Environment
  • nuxt 4.5.0, @nuxtjs/seo 5.3.3, npm 11.6.4, Node 24.18.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the dependency metadata for @vitejs/devtools-kit@0.3.4, devframe@0.5.4, and @devframes/hub@0.5.4, then compare the releases that use nostics@^1.1.4. Update or publish the compatible 0.3.x dependency path and verify that a conservative lockfile update no longer leaves nostics@0.2.0 at the root by rerunning the reported Nuxt 4.5 prerender build.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, nuxt, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.