nanostores/query

ERR_REQUIRE_ESM with Vitest

mikhin opened this issue · 0 comments

mikhin commented

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”,
}