Cannot find package 'vitest'
envgap__testing-library__jest-dom-662
01 / FAILURE SIGNATURE
As reported upstream
Error: Cannot find package 'vitest' imported from /path/to/project/ui/node_modules/.pnpm/@testing-library+jest-dom@6.6.3/node_modules/@testing-library/jest-dom/dist/vitest.mjs
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
1e39089d850408a583c83495d00d8aa27078933f- Manifest
package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
testing-library/jest-dom #662 · read the original issue
- `@testing-library/jest-dom` version: 6.6.3 - `node` version: v22.13.1 - `jest` (or `vitest`) version: 3.0.5 - `npm` (or `yarn`) version: pnpm@9.15.1 ### Relevant code or config: ``` ; .npmrc hoist=false ``` ### What you did: Tried running tests. ### What happened: ``` Error: Cannot find package 'vitest' imported from /path/to/project/ui/node_modules/.pnpm/@testing-library+jest-dom@6.6.3/node_modules/@testing-library/jest-dom/dist/vitest.mjs ``` ### Suggested solution: `vitest` is declared in the `devDependencies` of `@testing-library/jest-dom` but it must be declared in the `dependencies` or `peerDependencies` because `@testing-library/jest-dom/dist/vitest.mjs` is importing `vitest`s `expect` at test run time.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]