You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running vitest typecheck --run in a project using Yarn PnP there is an unhandled error (--watch does not show this error):
$ yarn run vitest typecheck --run
Testing types with tsc and vue-tsc is an experimental feature.
Breaking changes might not follow semver, please pin Vitest's version when using it. RUN v0.34.6 /home/ubuntu/code/tmp/yarn-pnp-vite-typecheck ✓ types.test-d.ts⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯Vitest caught 1 unhandled error during the test run.This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Typecheck Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯Error: error TS5033: Could not write file '/home/ubuntu/code/tmp/yarn-pnp-vite-typecheck/.yarn/__virtual__/vitest-virtual-8a19f9ae5b/4/.yarn/berry/cache/vitest-npm-0.34.6-48e1d6f80a-10c0.zip/node_modules/vitest/dist/tsconfig.tmp.tsbuildinfo': Unimplemented.⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Test Files 1 passed (1) Tests 1 passed (1)Type Errors no errors Errors 1 error Start at 11:43:39 Duration 2.48s
It looks like it could be trying to write the tsbuildinfo file to the yarn cache.
In tsconfig.json if you set "module": "System", and "outFile": "./build" the error goes away. Likewise, setting nodeLinker: node-modules in .yarnrc.yml it also makes the issue go away.
Run yarn install && yarn run vitest typecheck --run.
System Info
System:
OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (4) arm64 unknown
Memory: 11.12 GB / 11.66 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.9.0 - /snap/node/7891/bin/node
Yarn: 1.22.19 - /snap/node/7891/bin/yarn
npm: 10.1.0 - /snap/node/7891/bin/npm
Note the yarn version from envinfo is not correct.
$ yarn --version
4.0.1
I'm also able to reproduce this with Yarn 3.6.4.
### Used Package Manager
yarn
### Validations
- [X] Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitest.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vitest/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
The text was updated successfully, but these errors were encountered:
Describe the bug
When running
vitest typecheck --run
in a project using Yarn PnP there is an unhandled error (--watch
does not show this error):It looks like it could be trying to write the tsbuildinfo file to the yarn cache.
In tsconfig.json if you set
"module": "System",
and"outFile": "./build"
the error goes away. Likewise, settingnodeLinker: node-modules
in .yarnrc.yml it also makes the issue go away.Reproduction
https://github.com/huwshimi/yarn-pnp-vite-typecheck
Run
yarn install && yarn run vitest typecheck --run
.System Info
I'm also able to reproduce this with Yarn 3.6.4.
The text was updated successfully, but these errors were encountered: