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
Hi. I imported react-frappe-charts in my app created with Create React App. It works fine but when I try to run any unit tests I get an error
● Test suite failed to run
/node_modules/react-frappe-charts/build/index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import React from "react";
^^^^^^
SyntaxError: Cannot use import statement outside a module
I believe this is because the library is using ES6 modules in production. Would you consider transpiling the code before publishing to npm?
Meanwhile, Can anyone think of a workaround so that I can run my tests?
The text was updated successfully, but these errors were encountered:
got around it by setting my jest config with "transformIgnorePatterns": ["/node_modules/(?!(react-frappe-charts|frappe-charts)/)"]
and changing .babelrc to babel.config.js and module exporting it
Hi. I imported
react-frappe-charts
in my app created with Create React App. It works fine but when I try to run any unit tests I get an errorI believe this is because the library is using ES6 modules in production. Would you consider transpiling the code before publishing to npm?
Meanwhile, Can anyone think of a workaround so that I can run my tests?
The text was updated successfully, but these errors were encountered: