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
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Version
27.4.7
Steps to reproduce
yarn install
yarn test:ts
Expected behavior
I expect jest to see the cjs modules pointed to in
package.json
fortiny-secp256k1
See https://github.com/bitcoinjs/tiny-secp256k1/blob/v2.2.0/package.json#L14-L30
exports["."].node.require
in the package.json points to cjs (we ship both cjs AND mjs with mjs as the default (.js extension))I would expect Jest to notice that "I am a node environment and need require not import, so I will load the cjs"
Actual behavior
Jest tries to load the mjs (.js) files and fails with
SyntaxError: Cannot use import statement outside a module
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: