Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.1.13 #2915

Closed
nypinstripes opened this issue Jul 26, 2022 · 11 comments · Fixed by #2919
Closed

Release 2.1.13 #2915

nypinstripes opened this issue Jul 26, 2022 · 11 comments · Fixed by #2919

Comments

@nypinstripes
Copy link

The issue which is not created via https://recharts.github.io/recharts-issue-helper will be closed immediately.

Please tell us what is in v2.1.13 on the changelog , thanks.

注意:不是用 https://recharts.github.io/recharts-issue-helper 创建的 issue 会被立即关闭。

@SferaDev
Copy link

SferaDev commented Jul 27, 2022

This release breaks compatibility in apps

@WolfyUK
Copy link

WolfyUK commented Jul 27, 2022

At the very least it seems to include #2893 which has caused us some issues

@fyoung-cpi
Copy link

fyoung-cpi commented Jul 27, 2022

After upgrading to 2.1.13, my Jest tests started failing:

Jest encountered an unexpected token

Details:

   ~/node_modules/d3-shape/src/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export {default as arc} from "./arc.js";

    SyntaxError: Unexpected token 'export'`
    

This confirms issue with #2893

@derekeder
Copy link

also getting this error after upgrading to 2.1.13:

/app/node_modules/d3-scale/src/index.js:1
export {
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

@WolfyUK
Copy link

WolfyUK commented Jul 28, 2022

Hopefully @jmfrancois is aware of the above. I had the same issue as @fyoung-cpi which I did manage to workaround using this solution, but to me a patch version upgrade should not mean I need to make any other configuration changes.

"scripts": {
  "test": "jest --transformIgnorePatterns \"node_modules/(?!d3-shape)/\"",
},

@jmfrancois
Copy link
Contributor

jmfrancois commented Jul 28, 2022

There is not issue at runtime, more around tooling with for us jest and I see nextjs also, so libs which parse the code. But no issue with webpack or babel which support ecmascript import/export.

I have mentionned it in my PR, do not know the release process of this lib...
Look at #2919 I have pushed what we have done on our side to fix jest config for d3

https://github.com/Talend/ui/pull/4081/files

@klausbadelt
Copy link

#2919 doesn't help with NextJS build errors though. Don't really know what to do here.

next build results in

> Build error occurred
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/kb/src/filmhub/web/node_modules/d3-shape/src/index.js from /Users/kb/src/filmhub/web/node_modules/recharts/lib/shape/Symbols.js not supported.
Instead change the require of index.js in /Users/kb/src/filmhub/web/node_modules/recharts/lib/shape/Symbols.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/kb/src/filmhub/web/node_modules/recharts/lib/shape/Symbols.js:14:16)
    at Object.<anonymous> (/Users/kb/src/filmhub/web/node_modules/recharts/lib/component/DefaultLegendContent.js:16:16)
    at Object.<anonymous> (/Users/kb/src/filmhub/web/node_modules/recharts/lib/component/Legend.js:16:29)
    at Object.<anonymous> (/Users/kb/src/filmhub/web/node_modules/recharts/lib/index.js:317:15)

@nypinstripes
Copy link
Author

@arcthur just giving a heads up, thanks

@jmfrancois
Copy link
Contributor

@klausbadelt could you please provide an example on which i can help ?
It seems pretty common I found many results around nextjs with this error and also with d3

@monsieurnebo
Copy link

Hello,

Thanks for your work on recharts.

Could you update the changelog with 2.1.13 please? It's pretty sensitive to update dependencies without knowing what contains the new version (and if it is breaking).

Related to:
#2658
#2918

eletallbetagouv added a commit to betagouv/signalconso-website that referenced this issue Aug 16, 2022
@klausbadelt
Copy link

@jmfrancois we have recharts": "2.1.13" in package.json, and our code simply imports from recharts like this

import {
  XAxis, YAxis, BarChart, Bar, Tooltip, CartesianGrid, ResponsiveContainer, Legend,
} from 'recharts'

When running next build we get the error posted above. Hope this helps!

poissoj added a commit to poissoj/livrelibre that referenced this issue Sep 24, 2022
They were causing an error with recharts v2.1.14.
Staying on recharts v2.1.12 because v2.1.13+ is broken (build error).
See recharts/recharts#2915
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants