After the yarn start command, the app run and freezes the UI, and display the above errors,
We have inspected the problem and got the following solution that was caused by react-scripts, so
We upgrade react-script into v5.0.0
We install react-error-overlay v6.0.9
We add "resolutions": { "react-error-overlay": "6.0.9" } into package.json, Then delete your yarn.lock or package-lock.json, then install your dependencies again.
After those setups, the app running well so is there any recommendation for this solution in the D2 ecosystem.
I was able to perform the suggested steps when I got this error, and it works for the initial app load but I’m still getting the error when the app hot reloads or when the app encounters an exception. Is there a workaround to solve this?
Hey @Danford_David - thank you for reporting this issue and sorry for the late reply. We (the DHIS2 team) have also recently encountered this issue for one of our apps and found that it was resolved by using the resolution you suggested ( "resolutions": { "react-error-overlay": "6.0.9" }).
One reason why you may still be encountering this issue might be due to using react-scripts v5 (instead of v4). If you’d like to continue to use react-scripts v5, @dhis2/cli-app-scripts version 8.3.3-beta.1 may work better as it depends on that version directly.
@nnkogift@Danford_David if even using @dhis2/cli-app-scripts version 8.3.3-beta.1 does not solve the issue I’d be more than happy to review your yarn.lock/package-lock.json files and try to find the root issue.