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
Perhaps something weird; I have specified vitest version 2.0.5 in package.json and running with CLI works. Still the extension prints out vitest version 1.5.1.
Reproduction
Closed source code, but here are the relevant files (slightly modified)
// The file called findEnv.test.ts/* eslint-disable no-template-curly-in-string */import{env}from'process';import{findEnv}from'./findEnv.js';constCLIENTID='prefix/app/${APP_VERSION}';describe('config',()=>{it('should find env',()=>{env.APP_VERSION='1.0.0';constresult=findEnv(CLIENTID);expect(result).toBe('prefix/app/1.0.0');});it('should throw error',()=>{deleteenv.APP_VERSION;expect(()=>findEnv(CLIENTID)).toThrowError(/Could not find env APP_VERSION/,);});});
// The file called findEnv.tsimport{env}from'process';exportfunctionfindEnv(str: string,strict: boolean=true): string{// Simplified codeif(str==='prefix/app/1.0.0'){returnstr}else{thrownewError(`Could not find env APP_VERSION`);}}
Output
[INFO 2:17:42 PM] [v1.0.7] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 2:17:43 PM] [API] Running Vitest v1.5.1 (my-frontend-app/vite.config.ts) with Node.js: /home/my-username/.nvm/versions/node/v20.14.0/bin/node
[INFO 2:17:43 PM] [API] Vitest v1.5.1 (my-frontend-app/vite.config.ts) process 1466673 created
[INFO 2:18:00 PM] [API] Collecting tests: src/api/utils/findEnv.test.ts
[Worker]
node:internal/event_target:1099
process.nextTick(() => { throw err; });
^
Error: Cannot find module '/home/my-username/repos/my-frontend-app/node_modules/tinypool/dist/esm/entry/worker.js'
at Function._resolveFilename (node:internal/modules/cjs/loader:1145:15)
at Function._load (node:internal/modules/cjs/loader:986:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at MessagePort.<anonymous> (node:internal/main/worker_thread:186:26)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:825:20)
at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)
Emitted 'error' event on Tinypool instance at:
at EventEmitterReferencingAsyncResource.runInAsyncScope (node:async_hooks:206:9)
at Tinypool.emit (file:///home/my-username/repos/my-frontend-app/node_modules/tinypool/dist/esm/index.js:61:31)
at Worker.<anonymous> (file:///home/my-username/repos/my-frontend-app/node_modules/tinypool/dist/esm/index.js:752:30)
at Worker.emit (node:events:519:28)
at [kOnErrorMessage] (node:internal/worker:326:10)
at [kOnMessage] (node:internal/worker:337:37)
at MessagePort.<anonymous> (node:internal/worker:232:57)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:825:20)
at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28) {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.14.0
Version
1.0.7
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.
Hello @Sti2nd. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.
Describe the bug
See the below Output and Reproduction.
Perhaps something weird; I have specified vitest version 2.0.5 in package.json and running with CLI works. Still the extension prints out vitest version 1.5.1.
Reproduction
Closed source code, but here are the relevant files (slightly modified)
Output
Version
1.0.7
Validations
The text was updated successfully, but these errors were encountered: