Closed alditis closed 4 months ago
Hello, @alditis! 👋 I'm here to help you with any bugs, questions, or contributions while you're waiting for a human maintainer. Let's squash those bugs together!
To resolve the dependency conflict when updating to Vitest 2.0.3, you can modify the resolutions
field in your package.json
to force the version of Vitest to 2.0.3. Here is how you can do it:
"resolutions": {
"@cucumber/cucumber": "10.7.0",
"@nuxt/kit": "^3.11.2",
"@nuxt/schema": "^3.11.2",
"@nuxt/test-utils": "workspace:*",
"rollup": "4.18.0",
"vite": "5.2.11",
"vue": "^3.4.27",
"vitest": "2.0.3"
}
This will ensure that vitest
is resolved to version 2.0.3, overriding any conflicting versions specified by other dependencies.
Additionally, ensure you have the correct setup in your nuxt.config
and vitest.config.ts
files as per the Nuxt documentation:
Add @nuxt/test-utils/module
to your nuxt.config
file (optional):
export default defineNuxtConfig({
modules: [
'@nuxt/test-utils/module'
]
})
Create a vitest.config.ts
with the following content:
import { defineVitestConfig } from '@nuxt/test-utils/config'
export default defineVitestConfig({
// any custom Vitest config you require
})
By following these steps, you can manage the dependency conflict and ensure your testing environment is correctly configured [1][2][3].
To continue talking to Dosu, mention @dosu.
The advice here from @dosubot doesn't work.
This conflict was resolved in https://github.com/nuxt/test-utils/pull/888 last week, so it should be fixed in the next release.
Unfortunately nuxt/test-utils hasn't had a new release for a couple of months, hopefully the maintainer will find time to prep a release to get this fix out. :crossed_fingers:
The fact that there's no release makes it kinda impossible to upgrade to Vitest 2. 😕
Also @danielroe I think the CI has a problem ? I wanted to use a nightly release (afaik they're created automatically when pushing to main) but can't find any. I looked at the Github Action and it seems like an error is throwing during nightly release : https://github.com/nuxt/test-utils/actions/runs/9997183613/job/27633175272#step:7:11
Indeed, hopefully the maintainer will find time to prep a release.
(Who can say ...?)
Feels good
released ✅
Works like a charm, thanks for handling this so fast !
Thanks @danielroe ! :heart:
Did not mean any disrespect, I genuinely appreciate the work and time you put into this.
No disrespect received ❤️
Describe the feature
Vitest current version is 2.0.3. @nuxt/test-utils uses Vitest 1.0.6.
Error:
Additional information
Final checks