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

ERR_REQUIRE_ESM with Vitest #9

Closed
mikhin opened this issue May 10, 2023 · 0 comments · Fixed by #11
Closed

ERR_REQUIRE_ESM with Vitest #9

mikhin opened this issue May 10, 2023 · 0 comments · Fixed by #11

Comments

@mikhin
Copy link

mikhin commented May 10, 2023

Met an error while running tests with Vitest:

Error: require() of ES Module /Users/WebstormProjects/node_modules/.pnpm/nanostores@0.8.1/node_modules/nanostores/index.js from /Users/WebstormProjects/node_modules/.pnpm/@nanostores+query@0.0.7_nanostores@0.8.1/node_modules/@nanostores/query/dist/nanoquery.umd.cjs not supported.
Instead change the require of index.js in /Users/WebstormProjects/node_modules/.pnpm/@nanostores+query@0.0.7_nanostores@0.8.1/node_modules/@nanostores/query/dist/nanoquery.umd.cjs to a dynamic import() which is available in all CommonJS modules.
Serialized Error: {
  “code”: “ERR_REQUIRE_ESM”,
}
@dkzlv dkzlv mentioned this issue May 11, 2023
@dkzlv dkzlv closed this as completed in #11 May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant