Skip to content

Issues with monorepo template scripts #1318

@Dschungelabenteuer

Description

@Dschungelabenteuer

Describe the bug

Not sure if this is a vite-plus or a vite-task issue, sorry.

When I create a new monorepo project through vp create, a README.md is generated that hints to several vite-plus commands e.gvp run ready. If I run this command from the monorepo root, it fails with the following content:

error: Failed to plan tasks from `vp run test -r` in task incentive-urge#ready
* Task "test" not found
FWIW the default "ready" script
vp fmt && vp lint && vp run test -r && vp run build -r

(Note that the generated root package.json doesn't include a test script).

I'd expect the vp run test -r to run all test scripts across all monorepo packages. The monorepo template generates a packages/utils package whose package.json actually includes a test script, so the vp run test -r should theoretically work but somehow doesn't?

This error can be fixed by defining an actual test script in the root package.json (note there's the exact same issue with the build task). But for vp run test -r to rely on the existence of a root "test" script instead of child/packages "test" scripts feel so unnatural I'm pretty sure it is a bug.

Reproduction

https://github.com/Dschungelabenteuer/vite-plus-monorepro

Steps to reproduce

No response

System Info

Environment:
  Version       24.14.1
  Source        engines.node
  Source Path   E:\Development\lab\incentive-urge\package.json
  Project Root  E:\Development\lab\incentive-urge

Tool Paths:
  node  C:\Users\n028\.vite-plus\js_runtime\node\24.14.1\node.exe
  npm   C:\Users\n028\.vite-plus\js_runtime\node\24.14.1\npm.cmd
  npx   C:\Users\n028\.vite-plus\js_runtime\node\24.14.1\npx.cmd


vp v0.1.13

Local vite-plus:
  vite-plus  v0.1.15

Tools:
  vite             v8.0.3
  rolldown         v1.0.0-rc.12
  vitest           v4.1.2
  oxfmt            v0.43.0
  oxlint           v1.58.0
  oxlint-tsgolint  v0.18.1
  tsdown           v0.21.7

Environment:
  Package manager  pnpm v10.33.0
  Node.js          v24.14.1 (engines.node)

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions