Error [ERR_REQUIRE_ESM]: require() of ES Module in @expo/json-file/build/JsonFile.js not supported

I just took the latest code from my repository of our mobile app and on trying to start the project with yarn start for this error. Strange that this is occurring in a file in node_modules of @expo/json-file.

Can someone help please? Been stuck with this a while.
My OS is MacOS, Expo version is ~48.0.11 and the project is a managed project. typescript is ^5.0.4, ts-node is ^10.9.1, @expo/json-file is ^8.2.37 and @expo/cli @0.7.1

I have tried deleting node_modules folders and re-install all packages but the error persists. I tried adding “type”: “module” in package.json but it didnt help. No changes have been made to the package.json from the last time our project was successfully running.

> yarn start
yarn run v1.22.19
$ expo start
const code_frame_1 = require("@babel/code-frame");

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/sgrover/Projects/ht/node_modules/@expo/json-file/node_modules/@babel/code-frame/lib/index.js from /Users/sgrover/Projects/ht/node_modules/@expo/json-file/build/JsonFile.js not supported.
Instead change the require of index.js in /Users/sgrover/Projects/ht/node_modules/@expo/json-file/build/JsonFile.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/sgrover/Projects/ht/node_modules/@expo/json-file/build/JsonFile.js:29:22)
    at Object.<anonymous> (/Users/sgrover/Projects/ht/node_modules/@expo/cli/build/src/api/user/UserSettings.js:7:40)
    at Object.<anonymous> (/Users/sgrover/Projects/ht/node_modules/@expo/cli/build/src/utils/analytics/rudderstackClient.js:13:44)
    at /Users/sgrover/Projects/ht/node_modules/@expo/cli/build/bin/cli:247:32 {