Skip to content
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

Vike Bug during vitest run #1591

Closed
mpiniarski opened this issue Apr 2, 2024 · 5 comments
Closed

Vike Bug during vitest run #1591

mpiniarski opened this issue Apr 2, 2024 · 5 comments
Labels

Comments

@mpiniarski
Copy link

Description

Hello, when running vitest run I get the following error:

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: [vike@0.4.167][Bug] You stumbled upon a Vike bug. Go to https://github.com/vikejs/vike/issues/new and copy-paste this error. A maintainer will fix the bug (usually under 24 hours).
    at assertIsNpmPackageImport (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vike/dist/esm/utils/isNpmPackage.js:22:5)
    at file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vike/dist/esm/node/plugin/plugins/devConfig/determineOptimizeDeps.js:55:21
    at Array.forEach (<anonymous>)
    at file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vike/dist/esm/node/plugin/plugins/devConfig/determineOptimizeDeps.js:38:59
    at Array.forEach (<anonymous>)
    at getPageDeps (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vike/dist/esm/node/plugin/plugins/devConfig/determineOptimizeDeps.js:37:21)
    at determineOptimizeDeps (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vike/dist/esm/node/plugin/plugins/devConfig/determineOptimizeDeps.js:12:40)
    at configResolved (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vike/dist/esm/node/plugin/plugins/devConfig/index.js:57:17)
    at async Promise.all (index 7)
    at resolveConfig (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vitest/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:68253:5)
    at _createServer (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vitest/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:64503:20)
    at createViteServer (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vitest/dist/vendor/cac.RvTIWZBK.js:10951:18)
    at createVitest (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vitest/dist/vendor/cac.RvTIWZBK.js:12219:18)
    at startVitest (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vitest/dist/vendor/cac.RvTIWZBK.js:18772:15)
    at start (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vitest/dist/vendor/cac.RvTIWZBK.js:19563:17)
    at CAC.run (file:///Users/mpiniarski/Projects/Siemens/frontend-core/node_modules/vitest/dist/vendor/cac.RvTIWZBK.js:19544:3)

i'm using "vike": "0.4.167", "vite": "4.4.0" and "vitest": "0.32.0" (but the error also happens with "vitest": "1.4.0")

@brillout
Copy link
Member

brillout commented Apr 2, 2024

Do you get this with 0.4.168 as well? If yes, then share the new stack trace for that version.

Closing in the meantime, but I'll re-open if you still get this with 168.

@brillout brillout closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@mpiniarski
Copy link
Author

0.4.168 fixes the issue, thanks

@brillout
Copy link
Member

brillout commented Apr 2, 2024

Ok great. (Btw. in case your company would be for it: #1350, it makes a massive difference.)

@vchirikov
Copy link
Contributor

@brillout Hi, I found that this can also be caused by the full path in --root vitest's parameter on Windows

Should the issue be reopened?

image

    "vike": "0.4.168",
    "vite": "5.2.7",
    "vitest": "1.4.0"

@brillout
Copy link
Member

brillout commented Apr 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants