Home > Mobile >  TypeError: Cannot read properties of undefined (reading 'hookChildProcess') in react nativ
TypeError: Cannot read properties of undefined (reading 'hookChildProcess') in react nativ

Time:06-25

When i run npx react-native run-android this error show: Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. error Failed to run jetifier. TypeError: Cannot read properties of undefined (reading 'hookChildProcess') at module.exports (/Volumes/Os/ReactNativePROJECT/Educational/node_modules/react-native/node_modules/execa/index.js:308:22) at Object.runAndroid [as func] (/Volumes/Os/ReactNativePROJECT/Educational/node_modules/react-native/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:104:34) at Command.handleAction (/Volumes/Os/ReactNativePROJECT/Educational/node_modules/@react-native-community/cli/build/index.js:192:23) at Command.listener (/Volumes/Os/ReactNativePROJECT/Educational/node_modules/commander/index.js:315:8) at Command.emit (node:events:527:28) at Command.parseArgs (/Volumes/Os/ReactNativePROJECT/Educational/node_modules/commander/index.js:651:12) at Command.parse (/Volumes/Os/ReactNativePROJECT/Educational/node_modules/commander/index.js:474:21) at setupAndRun (/Volumes/Os/ReactNativePROJECT/Educational/node_modules/@react-native-community/cli/build/index.js:271:24) at run (/Volumes/Os/ReactNativePROJECT/Educational/node_modules/@react-native-community/cli/build/index.js:212:11) at Object. (/Volumes/Os/ReactNativePROJECT/Educational/node_modules/@react-native-community/cli/build/bin.js:8:11) info Run CLI with --verbose flag for more details.

CodePudding user response:

Its all because of react-native navigation, to solve this problem Follow the Steps:-

  1. Create a new Project
  2. install react-native navigation module with the following command npm install @react-navigation/native
  3. then install react navigation stack with the following command npm install @react-navigation/native-stack
  4. run your project with the following command first run this command npx react-native start and then run this command npx react-native run-android Hope this help you :)
  • Related