Describe the bug
When I run vp test --coverage, it attempts to install @vitest/coverage-v8 by storybook, but it appears to be failing.
This wouldn't happen if the user had run vp add -D @vitest/coverage-v8 beforehand, but it seems to occur because vp doesn't set the PATH for pnpm.
It might be more user-friendly if vite+ displayed a prompt asking users to install a coverage provider for Vite in advance.
Reproduction
https://github.com/eggplants/michixa/tree/dada49e83965223ca89fe65d5045641ec7cc6128
Steps to reproduce
Launch Dev Container and run vp test --coverage.
System Info
❯ vp env current
VITE+ - The Unified Toolchain for the Web
Environment:
Version 24.16.0
Source lts
Tool Paths:
node /root/.vite-plus/js_runtime/node/24.16.0/bin/node
npm /root/.vite-plus/js_runtime/node/24.16.0/bin/npm
npx /root/.vite-plus/js_runtime/node/24.16.0/bin/npx
❯ vp --version
VITE+ - The Unified Toolchain for the Web
vp v0.1.22
Local vite-plus:
vite-plus v0.1.22
Tools:
vite v8.0.11
rolldown v1.0.0
vitest v4.1.6
oxfmt v0.48.0
oxlint v1.63.0
oxlint-tsgolint v0.22.1
tsdown v0.22.0
Environment:
Package manager pnpm v11.2.2
Node.js v24.16.0
Used Package Manager
pnpm
Logs
❯ vp test --coverage
VITE+ - The Unified Toolchain for the Web
│
▲ No story files found for the specified pattern:
│ src/**/*.mdx
MISSING DEPENDENCY Cannot find dependency '@vitest/coverage-v8'
✔ Do you want to install @vitest/coverage-v8? … yes
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Startup Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: spawn pnpm ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:287:19)
at onErrorNT (node:internal/child_process:508:16)
at processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn pnpm',
path: 'pnpm',
spawnargs: [
'install',
'-D',
'-w',
'--prod=false',
'@vitest/coverage-v8@0.1.22'
]
}
❯ vp add -D @vitest/coverage-v8
[WARN] 2 deprecated subdependencies found: glob@11.1.0, source-map@0.8.0-beta.0
Packages: +26 -14
++++++++++++++++++++++++++--------------
Progress: resolved 764, reused 598, downloaded 0, added 0, done
[WARN] Issues with peer dependencies found. Run "pnpm peers check" to list them.
dependencies:
+ vitest <- @voidzero-dev/vite-plus-test 0.1.22
devDependencies:
+ @vitest/coverage-v8 4.1.7
- vitest 0.1.22
Done in 7s using pnpm v11.2.2
❯ vp test --coverage
...
Test Files 8 passed (8)
Tests 45 passed (45)
Start at 19:02:50
Duration 14.31s (transform 60ms, setup 20.60s, import 8.15s, tests 13.11s, environment 1.07s)
% Coverage report from v8
...
❯ which pnpm
pnpm not found
❯ find /root/.vite-plus -name 'pnpm'
/root/.vite-plus/js_runtime/node/24.16.0/lib/node_modules/corepack/shims/nodewin/pnpm
/root/.vite-plus/js_runtime/node/24.16.0/lib/node_modules/corepack/shims/pnpm
/root/.vite-plus/package_manager/pnpm
/root/.vite-plus/package_manager/pnpm/11.3.0/pnpm
/root/.vite-plus/package_manager/pnpm/11.3.0/pnpm/bin/pnpm
/root/.vite-plus/package_manager/pnpm/11.2.2/pnpm
/root/.vite-plus/package_manager/pnpm/11.2.2/pnpm/bin/pnpm
Validations
Describe the bug
When I run
vp test --coverage, it attempts to install@vitest/coverage-v8by storybook, but it appears to be failing.This wouldn't happen if the user had run
vp add -D @vitest/coverage-v8beforehand, but it seems to occur because vp doesn't set the PATH for pnpm.It might be more user-friendly if vite+ displayed a prompt asking users to install a coverage provider for Vite in advance.
Reproduction
https://github.com/eggplants/michixa/tree/dada49e83965223ca89fe65d5045641ec7cc6128
Steps to reproduce
Launch Dev Container and run
vp test --coverage.System Info
Used Package Manager
pnpm
Logs
Validations