Skip to content

vp test fails with missing server export from @vitest/browser/context when using @storybook/addon-vitest #1086

@hwld

Description

@hwld

Describe the bug

When using @storybook/addon-vitest, vp test fails because the bundled dist/@vitest/browser/context.js does not provide a server export.

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/23379425887/job/68016454899

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.13

Local vite-plus:
  vite-plus  v0.1.13

Tools:
  vite             v8.0.1
  rolldown         v1.0.0-rc.10
  vitest           v4.1.0
  oxfmt            v0.41.0
  oxlint           v1.56.0
  oxlint-tsgolint  v0.17.1
  tsdown           v0.21.4

Environment:
  Package manager  pnpm v10.32.1
  Node.js          v24.14.0

Used Package Manager

pnpm

Logs

SyntaxError: The requested module '.../@voidzero-dev/vite-plus-test/dist/@vitest/browser/context.js' does not provide an export named 'server'

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