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

Vitest extension crashes on run with coverage #547

Closed
4 tasks done
sashberd opened this issue Dec 3, 2024 · 4 comments
Closed
4 tasks done

Vitest extension crashes on run with coverage #547

sashberd opened this issue Dec 3, 2024 · 4 comments

Comments

@sashberd
Copy link

sashberd commented Dec 3, 2024

Describe the bug

Click on run with coverage from menu or from tests explorer crash extesion

Reproduction

20241203_102338

Output

[10:55:32 AM] Disposing test runner
[10:55:32 AM] Ending test run <none>
[INFO 10:55:32 AM] [API] Running Vitest v2.1.6 (darwin-web/vitest.config.ts) with [email protected]: C:\Program Files\nodejs\node.EXE 
[INFO 10:55:33 AM] [API] Vitest v2.1.6 (darwin-web/vitest.config.ts) child process 10984 created
[INFO 10:55:33 AM] [API] Watching C:/Users/LQ4161/Desktop/Dev/darwin-web/vitest.config.ts
[INFO 10:55:33 AM] [VSCODE] Watching darwin-web with pattern **/*
[INFO 10:55:33 AM] [API] Collecting tests: src/tests/app/modules/devicesSensors/sideMenu/channelDataFault.test.tsx
[10:55:33 AM] Not starting the runner because tests are being collected for src/tests/app/modules/devicesSensors/sideMenu/channelDataFault.test.tsx
[INFO 10:55:34 AM] [Worker] �[2m10:55:34 AM�[22m �[31m�[1m[vite]�[22m�[39m �[31m�[2m(client)�[22m�[39m Pre-transform error: Failed to resolve entry for package "http". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: �[35mvite:import-analysis�[39m
  File: �[36mC:/Users/LQ4161/Desktop/Dev/darwin-web/node_modules/.pnpm/[email protected]/node_modules/axios/lib/adapters/http.js�[39m:8:19
�[33m  6  |  import buildURL from './../helpers/buildURL.js';
  7  |  import proxyFromEnv from 'proxy-from-env';
  8  |  import http from 'http';
     |                    ^
  9  |  import https from 'https';
  10 |  import util from 'util';�[39
[10:55:39 AM] There is no test run for "channelDataFault.test.tsx"
[10:55:39 AM] No test run to finish for src/tests/app/modules/devicesSensors/sideMenu/channelDataFault.test.tsx
[INFO 10:55:49 AM] [Worker] Running coverage with configuration: {
  provider: 'v8',
  enabled: true,
  all: true,
  clean: true,
  cleanOnRerun: true,
  reportsDirectory: 'C:/Users/LQ4161/AppData/Local/Temp/vitest-coverage-787d8180-fda2-455e-8888-85cd723b8e27',
  exclude: [
    'coverage/**',
    'dist/**',
    '**/node_modules/**',
    '**/[.]**',
    'packages/*/test?(s)/**',
    '**/*.d.ts',
    '**/virtual:*',
    '**/__x00__*',
    '**/\x00*',
    'cypress/**',
    'test?(s)/**',
    'test?(-*).?(c|m)[jt]s?(x)',
    '**/*{.,-}{test,spec,bench,benchmark}?(-d).?(c|m)[jt]s?(x)',
    '**/__tests__/**',
    '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*',
    '**/vitest.{workspace,projects}.[jt]s?(on)',
    '**/.{eslint,mocha,prettier}rc.{?(c|m)js,yml}',
    'vitest-setup.tsx'
  ],
  reportOnFailure: true,
  reporter: [ [ 'json', [Object] ] ],
  extension: [
    '.js',     '.cjs',
    '.mjs',    '.ts',
    '.mts',    '.tsx',
    '.jsx',    '.vue',
    '.svelte', '.marko',
    '.astro'
  ],
  allowExternal: false,
  excludeAfterRemap: false,
  ignoreEmptyLines: true,
  processingConcurrency: 12,
  include: [ 'src/**/*', '!src/tests/**', '!src/modules/devices-sensors/**' ],
  thresholds: { functions: 75, branches: 75, statements: 75, lines: 75 }

[INFO 10:55:50 AM] [Worker] 
�[31m⎯⎯⎯⎯�[1m�[7m Unhandled Rejection �[27m�[22m⎯⎯⎯⎯⎯�[39
[INFO 10:55:50 AM] [Worker] �[31m�[1mError�[22m: Cannot find module 'semver/functions/gte'
Require stack:
- C:\Users\LQ4161\Desktop\Dev\darwin-web\node_modules\.pnpm\m[email protected]\node_modules\make-dir\index.js
- C:\Users\LQ4161\Desktop\Dev\darwin-web\node_modules\.pnpm\i[email protected]\node_modules\istanbul-lib-report\lib\file-writer.js
- C:\Users\LQ4161\Desktop\Dev\darwin-web\node_modules\.pnpm\i[email protected]\node_modules\istanbul-lib-report\lib\context.js
- C:\Users\LQ4161\Desktop\Dev\darwin-web\node_modules\.pnpm\i[email protected]\node_modules\istanbul-lib-report\index.js�[39m
�[90m �[2m❯�[22m Module._resolveFilename node:internal/modules/cjs/loader:�[2m1144:15�[22m�[39
[INFO 10:55:50 AM] [Worker] �[90m �[2m❯�[22m Module._load node:internal/modules/cjs/loader:�[2m985:27�[22m�[39m
�[90m �[2m❯�[22m Module.require node:internal/modules/cjs/loader:�[2m1235:19�[22m�[39m
�[90m �[2m❯�[22m require node:internal/modules/helpers:�[2m176:18�[22m�[39m
�[90m �[2m❯�[22m Object.<anonymous> node_modules/.pnpm/[email protected]/node_modules/make-dir/index.js:�[2m5:19�[22m�[39m
�[90m �[2m❯�[22m Module._compile node:internal/modules/cjs/loader:�[2m1376:14�[22m�[39
[INFO 10:55:50 AM] [Worker] �[90m �[2m❯�[22m Module._extensions..js node:internal/modules/cjs/loader:�[2m1435:10�[22m�[39m
�[90m �[2m❯�[22m Module.load node:internal/modules/cjs/loader:�[2m1207:32�[22m�[39m
�[90m �[2m❯�[22m Module._load node:internal/modules/cjs/loader:�[2m1023:12�[22m�[39m
�[90m �[2m❯�[22m Module.require node:internal/modules/cjs/loader:�[2m1235:19�[22m�[39m

�[31m�[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯�[22m�[39
[INFO 10:55:50 AM] [Worker] �[31m�[1mSerialized Error:�[22m�[39m �[90m{ code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\LQ4161\Desktop\Dev\darwin-web\node_modules\.pnpm\[email protected]\node_modules\make-dir\index.js', 'C:\Users\LQ4161\Desktop\Dev\darwin-web\node_modules\.pnpm\[email protected]\node_modules\istanbul-lib-report\lib\file-writer.js', 'C:\Users\LQ4161\Desktop\Dev\darwin-web\node_modules\.pnpm\[email protected]\node_modules\istanbul-lib-report\lib\context.js', 'C:\Users\LQ4161\Desktop\Dev\darwin-web\node_modules\.pnpm\[email protected]\node_modules\istanbul-lib-report\index.js' ] }�[39m


[10:55:50 AM] [API] Vitest child_process connection closed, cannot call RPC anymore.
[Error 10:55:50 AM] [API] Failed to close Vitest RPC [Error Error] [birpc] rpc is closed, cannot call "close"
Error: [birpc] rpc is closed, cannot call "close"
    at Proxy.O (c:\Users\LQ4161\.vscode\extensions\vitest.explorer-1.8.1\dist\extension.js:19:3709)
    at At.dispose (c:\Users\LQ4161\.vscode\extensions\vitest.explorer-1.8.1\dist\extension.js:21:3346)
    at c:\Users\LQ4161\.vscode\extensions\vitest.explorer-1.8.1\dist\extension.js:21:1736
    at Array.map (<anonymous>)
    at Ws.dispose (c:\Users\LQ4161\.vscode\extensions\vitest.explorer-1.8.1\dist\extension.js:21:1727)
    at c:\Users\LQ4161\.vscode\extensions\vitest.explorer-1.8.1\dist\extension.js:25:12326
    at ChildProcess.s (c:\Users\LQ4161\.vscode\extensions\vitest.explorer-1.8.1\dist\extension.js:21:1494)
    at ChildProcess.emit (node:events:531:35)
    at ChildProcess.emit (node:domain:488:12)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)
    at Process.callbackTrampoline (node:internal/async_hooks:130:17)
[Error 10:55:55 AM] [API] Failed to close Vitest process [Error Error] Vitest process did not exit in time
Error: Vitest process did not exit in time
    at Timeout._onTimeout (c:\Users\LQ4161\.vscode\extensions\vitest.explorer-1.8.1\dist\extension.js:21:3532)
    at listOnTimeout (node:internal/timers:581:17)
    at processTimers (node:internal/timers:519:7)

Version

1.8.1

Validations

@sheremet-va
Copy link
Member

sheremet-va commented Dec 3, 2024

Please read the "Output" requirements more carefuly:

The content of "Output" tab. You can open this tab by typing "> Show Vitest Output Channel" in a search bar or pressing "See error" on an error message if there is one. Your issue will be closed if you do not provide the full output (starting with Vitest version) - do not remove any "irrelevant" information - the maintainer will decide if it is valuable or not.

I do not see the first half of the output starting with the "Version". DO NOT CROP THE OUTPUT.

@sheremet-va sheremet-va closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2024
@sashberd
Copy link
Author

sashberd commented Dec 3, 2024

@sheremet-va I updated the description
That is the whole output I get on crash

@sheremet-va sheremet-va reopened this Dec 3, 2024
@sheremet-va
Copy link
Member

sheremet-va commented Dec 9, 2024

You have a very strange environment. Do you use the public Node.js binary? Do you have all @vitest packages installed? Did you run npm install?

@sashberd
Copy link
Author

I apologize for the delayed response.
Unfortunately, as we're managed by a company admin, I couldn't provide a specific information.
However, the issue seems to have resolved itself after recent OS and VSCode updates.
Thank you for your patience and understanding.
Please feel free to close this issue.
If the problem recurs, I'll provide an update.

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

No branches or pull requests

2 participants