Issue with updating packages for React SDK :thread...
# gooddata-cloud
m
Issue with updating packages for React SDK ๐Ÿงต
โœ… 1
I'm just trying to update the packages of the SDK to your latest version and I get the following error
Copy code
./node_modules/@gooddata/sdk-ui-geo/esm/core/MapboxTokenProvider.js
SyntaxError:node_modules/@gooddata/sdk-ui-geo/esm/core/MapboxTokenProvider.js: Missing class properties transform.
  19 | export function withMapboxToken(InnerComponent) {
  20 |     return class MapboxTokenHOC extends React.Component {
> 21 |         static contextType = MapboxTokenContext;
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  22 |         render() {
  23 |             const { mapboxToken } = this.context;
  24 |             const props = this.props;
    at transformFile.next (<anonymous>)
    at run.next (<anonymous>)
    at transform.next (<anonymous>)
Is it a known issue? These are the changes I've done
i
Hi Menelaos, May I know why are you trying to upgrade it, please? As far as I know, the latest stable version is 8.12.0.
I assume it is related to this release and support of React 18: https://support.gooddata.com/hc/en-us/articles/18891123992083-GoodData-Platform-July-27-2023
m
Hey @Ivana Gasparekova, this is what I used to have, however right above you told me that the export problem would be resolved if I upgrade to the latest. Isn't it true? https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1691759431844329?thread_ts=1691424791.517339&amp;cid=C04S1MSLEAW
i
I see, please let me double-check this with @Radek Novacek internally.
m
Thanks. Any updates @Ivana Gasparekova ?
r
Hi there @Menelaos Kotoglou, Have you followed the upgrade steps listed here? :)
m
Hi @Radek Novacek, just saw this. So v9 packages are only compatible with TypeScript v5?
i
@Menelaos Kotoglou yes you are right need TS 5
r
Although you shouldn't have to go all the way to v9, I double-checked this and the last customer who was having export issues updated from 8.12.1 to 8.12.2, and that was enough to mitigate this ๐Ÿ™‚
๐Ÿ™Œ 1
Hi @Menelaos Kotoglou, how are things looking for you? Have you decided to stick with v9 or take a smaller step to 8.12.2? And, in either case, were you able to get the update to work? ๐Ÿ™‚
m
Oh, thanks for that @Radek Novacek, I'll do so, since updating minor package will work. Haven't tried yet, so I will
๐Ÿคž 2
Hey, thanks all. I confirm that this was successfully resolved after upgrading the packages!
๐Ÿ™Œ 1
i
Thanks a lot for letting us know, those are great news! ๐Ÿ™Œ
๐Ÿ™Œ 1