Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI error for vitest --ui #4589

Closed
6 tasks done
JesusTheHun opened this issue Nov 25, 2023 · 2 comments · Fixed by #4593
Closed
6 tasks done

CLI error for vitest --ui #4589

JesusTheHun opened this issue Nov 25, 2023 · 2 comments · Fixed by #4593

Comments

@JesusTheHun
Copy link

Describe the bug

⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯
file:///Users/jonathan/IdeaProjects/couchnode/node_modules/vitest/dist/chunks/install-pkg.ORGzQeqb.js:5
import execa from 'execa';
       ^^^^^
SyntaxError: The requested module 'execa' does not provide an export named 'default'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

Reproduction

Executing vitest --ui without having @vitest/ui installed leads to the error.

npm i -D vitest@1.0.0-beta.5
vitest --ui

https://stackblitz.com/edit/vitest-dev-vitest-i4krdj?file=package.json

System Info

System:
    OS: macOS 14.1.1
    CPU: (12) arm64 Apple M2 Max
    Memory: 18.47 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.1/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.1/bin/npm
    pnpm: 7.29.1 - ~/.nvm/versions/node/v18.16.1/bin/pnpm
  Browsers:
    Chrome: 119.0.6045.159
    Edge: 119.0.2151.72
    Safari: 17.1
  npmPackages:
    vitest: 1.0.0-beta.5 => 1.0.0-beta.5

Used Package Manager

npm

Validations

@AriPerkkio
Copy link
Member

AriPerkkio commented Nov 26, 2023

Looks like install-pkg is actually correct. It's just Vitest's build that ends up using default export: https://unpkg.com/browse/vitest@1.0.0-beta.5/dist/chunks/install-pkg.ORGzQeqb.js

Maybe this is caused by Vitest depending on execa@8 and install-pkg@0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants