React Js Frontend Client - Error in node_module @Formatjs

Hi,

I’m trying to run the generated Frontend Reactjs Client, but keep getting the following typescript error:

C:/Users/donyt/Documents/Project/fundraiser/fundraiser_front/node_modules/@formatjs/intl-utils/dist/invariant.d.ts
TypeScript error in C:/Users/donyt/Documents/Project/fundraiser/fundraiser_front/node_modules/@formatjs/intl-utils/dist/invariant.d.ts(1,92):
‘{’ or ‘;’ expected. TS1144

1 | export declare function invariant(condition: boolean, message: string, Err?: any): asserts condition{} ;
| ^
2 |

I generated the react client using cuba studio or gen-cuba-front cli and get the same result.
I am unable to start the server or build the react application due to this error

Has anyone encountered this issue and how do I resolve this?

Thanks.

Regards,
John

Hi,
This was caused by recently released patch version of transitive dependency which introduced a breaking change by requiring newer version of TypeScript.
We’ve just released bug fix with temporary workaround (which contains locked dependency tree), so you can either re-create React module or bump TypeScript version in your package.json: "typescript": "3.7.4".
Sorry for the inconvenience.

2 Likes