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
0.26.1 failed to load url of virtual module on Windows #2548
Comments
Any update on this issue? |
I personally can't work on it until January 2nd. If someone else wants to try and fix it, go ahead 👍 |
I'm currently having a very similar issue to this! I believe it's something to do with the way files are being resolved in Windows. I have pretty much the same config except I have the following in my plugins: [react(), tsconfigPaths()], For me, when I have the above, none of the tests are resolved / found and the RUN statement returns completely blank. Meaning here is an example full output: RUN v0.26.2 /home/moishi/projecttest Followed by blank, meaning the default command prompt. After commenting out tsconfigPaths, my tests show like this: RUN v0.26.2 /home/moishi/capply
❯ test/unit/services/shipments.test.ts (0)
❯ test/unit/services/shipments.test.ts (0)
❯ test/unit/services/locations.test.ts (0)
❯ test/unit/services/shipments.test.ts (0)
❯ test/unit/services/locations.test.ts (0)
❯ test/unit/utils/filter-query.test.ts (0)
❯ test/unit/services/shipments.test.ts (0)
❯ test/unit/services/locations.test.ts (0)
❯ test/unit/utils/filter-query.test.ts (0)
❯ test/unit/services/shipments.test.ts (0)
❯ test/unit/services/locations.test.ts (0)
❯ test/unit/utils/filter-query.test.ts (0)
❯ test/unit/services/shipments.test.ts (0)
❯ test/unit/services/locations.test.ts (0)
❯ test/unit/utils/filter-query.test.ts (0)
...
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 34 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL test/unit/utils/sort-query.test.ts [ test/unit/utils/sort-query.test.ts ]
FAIL test/unit/services/currency.test.ts [ test/unit/services/currency.test.ts ]
FAIL test/unit/services/shipments/find.test.ts [ test/unit/services/shipments/find.test.ts ]
FAIL test/unit/services/organizations/create.test.ts [ test/unit/services/organizations/create.test.ts ]
FAIL test/unit/utils/assert.test.ts [ test/unit/utils/assert.test.ts ]
FAIL test/unit/utils/order.test.ts [ test/unit/utils/order.test.ts ]
Error: Failed to load url ~test/unit/setup/matchers (resolved id: ~test/unit/setup/matchers). Does the file exist?
❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-2285ba4f.js:40373:21
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/34]⎯
Test Files 34 failed (34)
Tests no tests
Start at 00:17:55
Duration 13.83s (transform 237ms, setup 0ms, collect 0ms, tests 0ms) Which is what leads me to think it's a weird windows resolve path situation. This is both happening to me on my Windows machine and funnily enough also on my WSL machine, however on a regular Linux server the project tests 100% ok. |
Describe the bug
No such issue for Linux
Clone the repo and run on Windows
pnpm install pnpm run test
Test will fail with the following error:
FAIL test/pages.test.ts [ test/pages.test.ts ] Error: Failed to load url D:/webprojects/vitest-pages-bug/@vite-plugin-pages/route-block (resolved id: D:/webprojects/vitest-pages-bug/@vite-plugin-pages/route-block). Does the file exist? ❯ loadAndTransform node_modules/.pnpm/vite@4.0.2_@types+node@18.11.17/node_modules/vite/dist/node/chunks/dep-6305614c.js:40425:21
Reproduction
https://github.com/kingyue737/vitest-pages-bug
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: