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

Clarify Vitest was initialized with Native Node error #1132

Closed
4 tasks done
sheremet-va opened this issue Apr 9, 2022 · 0 comments · Fixed by #1202
Closed
4 tasks done

Clarify Vitest was initialized with Native Node error #1132

sheremet-va opened this issue Apr 9, 2022 · 0 comments · Fixed by #1202
Labels
documentation Improvements or additions to documentation pr welcome

Comments

@sheremet-va
Copy link
Member

Clear and concise description of the problem

The error description is not clear to every user.

Suggested solution

Clarify that the error might be because:

  • User imports from vitest directly not in a test file - suggest importing from vitest/node or use import.meta.vitest
  • User imports from library that imports from vitest - suggest using deps.inline for that library
  • User imports vitest inside globalSetup, which has different context - suggest using setupFiles
  • Something bad happened, better create an issue in VItest repo

Alternative

No response

Additional context

No response

Validations

@antfu antfu added documentation Improvements or additions to documentation pr welcome labels Apr 10, 2022
chaii3 pushed a commit to chaii3/vitest that referenced this issue May 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation pr welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants