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

import { takeCoverage } from 'v8'; #675

Closed
6 tasks done
farazshuja opened this issue Feb 4, 2022 · 1 comment
Closed
6 tasks done

import { takeCoverage } from 'v8'; #675

farazshuja opened this issue Feb 4, 2022 · 1 comment

Comments

@farazshuja
Copy link

Describe the bug

  1. git clone https://github.com/vitest-dev/vitest.git .
  2. change directory to /examples/vue
  3. enter 'yarn' to install dependencies
  4. run 'yarn test'

Error:

$ vitest
(node:10) UnhandledPromiseRejectionWarning: file:///home/projects/vitest-dev-vitest-e8wbit/node_modules/vitest/dist/create-a1bc541a.js:13
import { takeCoverage } from 'v8';
         ^^^^^^^^^^^^
SyntaxError: The requested module 'v8' does not provide an export named 'takeCoverage'
    at ModuleJob._instantiate (https://vitest-dev-vitest-e8wbit.w.staticblitz.com/blitz.5df97b5e61f923919ea927c406a4806b792de8c6.js:6:739420)
    at async ModuleJob.run (https://vitest-dev-vitest-e8wbit.w.staticblitz.com/blitz.5df97b5e61f923919ea927c406a4806b792de8c6.js:6:740174)
    at async Loader.import (https://vitest-dev-vitest-e8wbit.w.staticblitz.com/blitz.5df97b5e61f923919ea927c406a4806b792de8c6.js:6:871574)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:10) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-e8wbit?file=vitest.config.ts

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 1.31 GB / 15.73 GB
  Binaries:
    Node: 14.17.6 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (97.0.1072.76)
    Internet Explorer: 11.0.22000.120

Used Package Manager

yarn

Validations

@sheremet-va
Copy link
Member

sheremet-va commented Feb 4, 2022

Duplicate of #670

Please upgrade to 0.2.7.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants