Open aelbore opened 7 months ago
I get the same error when I try to merge multiple test results with
npx vitest --merge-reports=reports --reporter=json --reporter=default
In the reports
folder there are further folders with the test results. If the test results lie flat in reports
, the same error occurs.
I get the same error when I try to merge multiple test results with
npx vitest --merge-reports=reports --reporter=json --reporter=default
In the
reports
folder there are further folders with the test results. If the test results lie flat inreports
, the same error occurs.
If you have an issue with merge reporter, create a separate issue. From you description, it seems that you are using it wrong. merge-reports
expects a folder with a flat structure containing only reports generated by --reporter=blob
.
I just got this error after updating from 2.0.5 to 2.1.0. I still need to rule out a CI caching issue, but this is the stack trace:
> vitest run
RUN v2.1.0 /builds/app
⎯⎯⎯⎯⎯⎯ 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.
⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯
Error: EISDIR: illegal operation on a directory, read
❯ readFileHandle node:internal/fs/promises:553:24
❯ node_modules/.pnpm/vitest@2.1.0_@types+node@22.5.4_@vitest+browser@2.1.0_@vitest+ui@2.1.0_less@4.2.0_msw@2.4.5_typescript@5.6.2_/node_modules/vitest/dist/chunks/resolveConfig.-K5hHm0S.js:4016:20
❯ groupFilesByEnv node_modules/.pnpm/vitest@2.1.0_@types+node@22.5.4_@vitest+browser@2.1.0_@vitest+ui@2.1.0_less@4.2.0_msw@2.4.5_typescript@5.6.2_/node_modules/vitest/dist/chunks/resolveConfig.-K5hHm0S.js:4012:24
❯ Object.runTests node_modules/.pnpm/vitest@2.1.0_@types+node@22.5.4_@vitest+browser@2.1.0_@vitest+ui@2.1.0_less@4.2.0_msw@2.4.5_typescript@5.6.2_/node_modules/vitest/dist/chunks/resolveConfig.-K5hHm0S.js:4256:28
❯ executeTests node_modules/.pnpm/vitest@2.1.0_@types+node@22.5.4_@vitest+browser@2.1.0_@vitest+ui@2.1.0_less@4.2.0_msw@2.4.5_typescript@5.6.2_/node_modules/vitest/dist/chunks/resolveConfig.-K5hHm0S.js:5134:5
❯ node_modules/.pnpm/vitest@2.1.0_@types+node@22.5.4_@vitest+browser@2.1.0_@vitest+ui@2.1.0_less@4.2.0_msw@2.4.5_typescript@5.6.2_/node_modules/vitest/dist/chunks/cli-api.KmLFBnKP.js:10246:9
❯ Vitest.runFiles node_modules/.pnpm/vitest@2.1.0_@types+node@22.5.4_@vitest+browser@2.1.0_@vitest+ui@2.1.0_less@4.2.0_msw@2.4.5_typescript@5.6.2_/node_modules/vitest/dist/chunks/cli-api.KmLFBnKP.js:10266:12
❯ Vitest.start node_modules/.pnpm/vitest@2.1.0_@types+node@22.5.4_@vitest+browser@2.1.0_@vitest+ui@2.1.0_less@4.2.0_msw@2.4.5_typescript@5.6.2_/node_modules/vitest/dist/chunks/cli-api.KmLFBnKP.js:10109:7
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -21, code: 'EISDIR', syscall: 'read' }
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Test Files no tests
Tests no tests
Errors 1 error
I debugged this and it seems that this line from resolveConfig.-K5hHm0S.js
(from the stacktrace) causes the crash
async function groupFilesByEnv(files) {
// ...
const code = await promises$1.readFile(file, "utf-8");
}
It appears the passed file is actually a folder ("node_modules/better-sqlite3"
in my case). This also happens if I explicitly exclude node_modules/**
in vitest.config.js
by the way.
Also happens with 2.1.1
@Dan1ve From the conversation on https://github.com/analogjs/analog/issues/1009, OP's issue seems specific to angular integration and some workaround is suggested there. Do you have a similar setup? If so, have you checked the workaround? If not, it's probably better to raise a new issue with a reproduction on your own so that we can investigate the issue further.
Thank you for the pointer. The error happens in a SvelteKit project (so no Angular), but I can do some experiments based on the linked issue, once I find the time.
Note that everything works fine with vitest 2.0.5 though.
Describe the bug
when running the test it has "Error: EISDIR: illegal operation on a directory" error. when using "happy-dom" and "jsdom" with "rxjs@6.6.7"
it works fine if
when it using playwright it works fine with using "happy-dom" and "jsdom" with "rxjs@7.x"
Reproduction
stackblitz https://stackblitz.com/edit/stackblitz-starters-yjhfgh
Just download and run it locally
System Info
Used Package Manager
npm
Validations