Skip to content

vite:monorepo template declares catalog entries that no workspace package uses #3381

Description

@schalkneethling

Describe the bug

A project created with vp create vite:monorepo declares two pnpm catalog entries that no workspace package uses, and one of them does not match the version the packages actually pin.

The template's pnpm-workspace.yaml (packages/cli/templates/monorepo/pnpm-workspace.yaml) sets catalogMode: prefer and declares:

catalog:
  "@types/node": ^24
  typescript: ^7.0.0

The generated workspace packages do not reference these entries with catalog:. They pin direct ranges instead:

packages/utils/package.json   "@types/node": "^26.6.5", "typescript": "^7.0.2"
apps/website/package.json     "typescript": "^7.0.2"

What I expect: the generated packages use "typescript": "catalog:" and "@types/node": "catalog:", so the catalog is the single source of the versions, or the template leaves out catalog entries that are not used. The @types/node range should also agree between the catalog (^24) and the package (^26.6.5).

What happens: the catalog entries are dead, and a dead-code checker such as Knip reports them on a new project. vp check passes, so nothing inside Vite+ points this out.

Related: #1835 is about vp add writing catalog: references. This report is about the manifests the template itself generates.

Reproduction

No separate repository: the bug reproduces with the single vp create command under "Steps to reproduce", on a clean directory.

Steps to reproduce

vp create vite:monorepo --directory repro --no-interactive --git --package-manager pnpm
cd repro
grep -n "catalog" pnpm-workspace.yaml
grep -rn '"typescript"\|"@types/node"' apps/*/package.json packages/*/package.json
pnpm dlx knip@6.44.1

Knip prints:

Unused catalog entries (2)
@types/node  default  pnpm-workspace.yaml:9:4
typescript   default  pnpm-workspace.yaml:10:3

System Info

$ vp env current
Node.js:
  Version    26.13.0
  Source     engines.node
  Installed  true
  Mode       managed

Package Manager:
  Name       pnpm
  Version    12.18.0
  Source     devEngines.packageManager
  Installed  true
  Mode       managed

$ vp --version
vp v1.5.0

Local vite-plus:
  vite-plus  v1.5.0

Tools:
  vite             v8.3.5
  rolldown         v1.2.16
  vitest           v5.1.0
  oxfmt            v0.76.0
  oxlint           v1.91.0
  oxlint-tsgolint  v7.0.2005
  tsdown           v0.23.4

The vp --version output is from the project's local vp (1.5.0); vp env current ran through the global binary (1.2.0), because the local one refuses env. Binary paths are removed.

Used Package Manager

pnpm

Logs

Not needed; the steps above reproduce it without any error output.

Validations

Activity

  1. added theissue type on Nov 7, 2026
  2. d4rshnn commented on Nov 8, 2026

    @d4rshnn

    Hi! I'd like to work on this issue.

    I'm planning to investigate the monorepo template generation and submit a PR with a minimal fix and regression tests.

    Please let me know if someone is already working on this. Thanks!

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

Metadata

Metadata

Assignees

Type

Fields

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions