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

vitest.config.js in 5.1.1 - Unknown Error: [object object] #12849

Closed
1 task
kevreth opened this issue Dec 29, 2024 · 2 comments
Closed
1 task

vitest.config.js in 5.1.1 - Unknown Error: [object object] #12849

kevreth opened this issue Dec 29, 2024 · 2 comments
Labels
needs triage Issue needs to be triaged

Comments

@kevreth
Copy link

kevreth commented Dec 29, 2024

Astro Info

$ npx astro info
Astro                    v5.1.1
Node                     v22.8.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/vue

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

This is a continuation of #12384, which is closed but the issue remains. Running any vitest, with Astro involved or not, with the recommended vitest.config.ts from the docs yields

Unhandled Error Unknown Error: [object Object]

What's the expected result?

Tests pass. As it is, executing in the termainal of the MRE

npx vitest test/basic.test.ts

Causes that test, and all tests if any are added, to fail.

Link to Minimal Reproducible Example

https://stackblitz.com/github/withastro/astro/tree/latest/examples/with-vitest?file=package.json

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Dec 29, 2024
@kevreth
Copy link
Author

kevreth commented Dec 29, 2024

Downgrading to Astro 4.16.17 immediately resolves the problem.

@ascorbic
Copy link
Contributor

ascorbic commented Jan 2, 2025

This is an upstream problem with Vitest support for Vite 6. You can install the beta version of vitest, which should work: try [email protected]. You can follow progress and see other possible workarounds at #12662

@ascorbic ascorbic closed this as completed Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants