1

I am running an old react-native app and its package.json files is below:

{
  "name": "mobilegame",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@expo/ngrok": "^2.4.3",
    "@material-ui/core": "^4.12.4",
    "@material-ui/icons": "^4.11.3",
    "@ptomasroos/react-native-multi-slider": "^2.2.2",
    "@react-native-async-storage/async-storage": "^1.17.5",
    "@react-native-community/netinfo": "^8.3.1",
    "@react-native-community/slider": "^4.1.12",
    "@react-navigation/native": "^6.0.10",
    "@react-navigation/native-stack": "^6.6.2",
    "expo": "^44.0.6",
    "expo-app-loading": "~1.3.0",
    "expo-av": "~10.2.0",
    "expo-cli": "^5.4.9",
    "expo-dev-client": "~0.8.5",
    "expo-location": "~14.0.1",
    "expo-status-bar": "~1.2.0",
    "lottie-react-native": "^5.1.3",
    "md5": "^2.3.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-base64": "^0.2.1",
    "react-native-elements": "^3.4.2",
    "react-native-expo-cached-image": "^1.3.1",
    "react-native-fast-image": "^8.5.11",
    "react-native-gifted-chat": "^1.0.0",
    "react-native-paper": "^4.12.1",
    "react-native-screens": "~3.10.1",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-sound": "^0.11.2",
    "react-native-web": "0.17.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

When running the app it gives an error saying "Metro Has Encountered an error: Cannot read properties of undefined(reading 'transformfile'). ERROR" which is occurring because the project's node version is lower than my system's. In order to downgrade, I need to know which node version is the project using. But I am not able to figure that out using the package.json file. Kindly help

enter image description here

Vipin Verma
  • 5,330
  • 11
  • 50
  • 92
  • According to [this](https://github.com/facebook/metro/issues/790#issuecomment-1255039285) comment node 16 or older should do it – vinayr Nov 08 '22 at 13:14

0 Answers0