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 through the extension, it will fail to resolve paths like ~/utils and other ones using ~, which is an alias that's available in Nuxt.
Running vitest in the CLI has no issues with this.
Manually adding aliasses to tsconfig or vitest's config have no effect.
[Error 8:13:12 PM] Error in /Users/reinierkaper/rvezy/rvezy-web-client/src/utils/rv/get-rv-snapshot.vitest.spec.ts Error: Failed to load url ~/constants (resolved id: ~/constants) in /Users/reinierkaper/rvezy/rvezy-web-client/src/utils/rv/get-rv-details.ts. Does the file exist?
at loadAndTransform (file:///Users/reinierkaper/rvezy/rvezy-web-client/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:51920:17)
at async ViteNodeServer._transformRequest (file:///Users/reinierkaper/rvezy/rvezy-web-client/node_modules/vite-node/dist/server.mjs:542:16)
at async ViteNodeServer._fetchModule (file:///Users/reinierkaper/rvezy/rvezy-web-client/node_modules/vite-node/dist/server.mjs:504:17)
at async Proxy.fetch (file:///Users/reinierkaper/rvezy/rvezy-web-client/node_modules/vitest/dist/chunks/resolveConfig.RxKrDli4.js:6616:22)
at async EventEmitter.onMessage (file:///Users/reinierkaper/rvezy/rvezy-web-client/node_modules/vitest/dist/chunks/index.68735LiX.js:91:20)
Extension Version
1.8.4
Vitest Version
2.1.8
Validations
Check that you are using the latest version of the extension
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Additional info: the CLI version also doesn't work when ran from the root with vitest directly, only when fed the config file.
Is this an issue with vitest itself then?
Describe the bug
When running vitest through the extension, it will fail to resolve paths like
~/utils
and other ones using~
, which is an alias that's available in Nuxt.Running vitest in the CLI has no issues with this.
Manually adding aliasses to tsconfig or vitest's config have no effect.
Reproduction
https://github.com/TheDutchCoder/vitest-extension-bug
Output
Part of the output with the errors.
Extension Version
1.8.4
Vitest Version
2.1.8
Validations
Screenshots
Example of the extension failing
Example of CLI working just fine:
The text was updated successfully, but these errors were encountered: