You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems node changed the way modules are loaded. I am getting
> pta src/**/*.test.js
internal/modules/cjs/loader.js:958
throw new ERR_REQUIRE_ESM(filename);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /var/storage/dev/projects/private/xstate.io/node_modules/zora/dist/bundle/index.js
at Object.Module._extensions..js (internal/modules/cjs/loader.js:958:13)
at Module.load (internal/modules/cjs/loader.js:798:32)
at Function.Module._load (internal/modules/cjs/loader.js:711:12)
at Module.require (internal/modules/cjs/loader.js:838:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/var/storage/dev/projects/private/xstate.io/node_modules/pta/src/cli.js:8:52)
at Module._compile (internal/modules/cjs/loader.js:945:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10)
at Module.load (internal/modules/cjs/loader.js:798:32)
at Function.Module._load (internal/modules/cjs/loader.js:711:12)
npm ERR! Test failed. See above for more details.
on nodejs 12.11.0
The text was updated successfully, but these errors were encountered:
Thanks for the report. It seems I misunderstood how to deal with type and main field in zora's package.json file. I have removed "type"="module and preserved a cjs version for backward compatibility.
Upgrade zora and it should work fine.
It seems node changed the way modules are loaded. I am getting
on nodejs 12.11.0
The text was updated successfully, but these errors were encountered: