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
Importing the .cjs module is just a workaround, and both modules are actually CJS (or more accurately, node modules; pmndrs/react-spring#601) and don't have ES6 module syntax; the ES6 module syntax is added by Jest somehow, which causes the error.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
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.
🐛 Bug Report
When importing a node module from
react-spring/renderprops
, it appears to be transformed to an ES module and fails to run.The imported module is not an ES module, so the source of the issue is unclear: https://unpkg.com/[email protected]/renderprops.js
Related issue: pmndrs/react-spring#601
To Reproduce
Minimal example repo: https://github.com/slikts/react-spring-bundle-example/
Expected behavior
Tests run without errors.
Run
npx envinfo --preset jest
Paste the results here:
System: OS: macOS High Sierra 10.13.6 CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Binaries: Node: 11.9.0 - /usr/local/bin/node Yarn: 1.13.0 - /usr/local/bin/yarn npm: 6.5.0 - /usr/local/bin/npm npmPackages: jest: ^24.5.0 => 24.5.0
The text was updated successfully, but these errors were encountered: