-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Describe the bug
@storybook/addon-vitest internally imports @vitest/browser/context within test-utils.js. This import fails when running Storybook's browser tests using vp test.
This is similar to #894, but it differs in that vp migrate cannot fix it because the import comes from an external library.
Reproduction
https://github.com/hwld/vite-plus-vitest-browser-context-repro/tree/storybook-repro
Steps to reproduce
git clone https://github.com/hwld/vite-plus-vitest-browser-context-repro.git
cd vite-plus-vitest-browser-context-repro
git switch storybook-repro
vp install
vp exec playwright install --with-deps chromium
vp test
It also reproduces on GitHub Actions:
https://github.com/hwld/vite-plus-vitest-browser-context-repro/actions/runs/23143549750/job/67225684325
System Info
VITE+ - The Unified Toolchain for the Web
Environment:
Version 24.14.0
Source lts
Tool Paths:
node /Users/hwld/.vite-plus/js_runtime/node/24.14.0/bin/node
npm /Users/hwld/.vite-plus/js_runtime/node/24.14.0/bin/npm
npx /Users/hwld/.vite-plus/js_runtime/node/24.14.0/bin/npx
---
VITE+ - The Unified Toolchain for the Web
vp v0.1.12
Local vite-plus:
vite-plus v0.1.12
Tools:
vite v8.0.0
rolldown v1.0.0-rc.9
vitest v4.1.0
oxfmt v0.40.0
oxlint v1.55.0
oxlint-tsgolint v0.17.0
tsdown v0.21.3
Environment:
Package manager pnpm v10.32.1
Node.js Not foundUsed Package Manager
pnpm
Logs
Pre-transform error: Failed to load url .../vite-plus-test/dist/@vitest/browser/@vitest/browser/context.jsValidations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels