Skip to content

Vitest 3.2.3 + browser incompatible with yarn pnp #8138

@mrginglymus

Description

@mrginglymus

Describe the bug

Updating to vitest 3.2.3 using browser + yarn pnp causes tests to hang indefinitely. When killed, the following error is shown:

SyntaxError: The requested module '/@fs/C:/dev/.yarn/berry/cache/js-tokens-npm-9.0.1-3ed793c0c1-10c0.zip/node_modules/js-tokens/index.js?v=cb2a1a53' does not provide an export named 'default'

Reproduction

https://github.com/mrginglymus/vitest-bork

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (24) x64 Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz
    Memory: 21.10 GB / 63.80 GB
  Binaries:
    Node: 22.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 4.6.0 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (136.0.3240.76)
    Internet Explorer: 11.0.19041.5794

Used Package Manager

yarn

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions