vitest icon indicating copy to clipboard operation
vitest copied to clipboard

`vitest --ui` throws error

Open stoplion opened this issue 1 year ago • 1 comments

Describe the bug

Running vitest --ui throws React error:

Uncaught SyntaxError: The requested module '/node_modules/react/index.js' does not provide an export named 'useState'

Reproduction

  • versions 0.22.1 of both libraries.
  • using Typescript
  • run vitest --ui

System Info

System:
    OS: macOS 12.3
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.02 GB / 64.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.16.0 - /usr/local/bin/node
    Yarn: 1.22.0 - ~/.yarn/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 103.1.41.100
    Chrome: 104.0.5112.101
    Safari: 15.4
  npmPackages:
    @vitejs/plugin-react: ^2.0.1 => 2.0.1 
    vite: ^3.0.7 => 3.0.8 
    vitest: 0.22.1 => 0.22.1

Used Package Manager

yarn

Validations

stoplion avatar Aug 19 '22 02:08 stoplion

Hi, can you please provide a code reproduction because i wasn't able to reproduce it.

edimitchel avatar Sep 07 '22 00:09 edimitchel