skip to Main Content

Running Android in React Native has issues with the Android display:

The development server returned response error code: 500

URL: http://localhost:8081/index.bundle ?platform=android&dev=true&lazy=true&minify =false&app=com.yuda&modulesOnly=false& runModule=true

Body:

{"originModulePath":"C: MobileAppYudaNavigation.tsx" ,"targetModuleName":"@react-navigation /stack", "message":"Unable to resolve module @react-navigation/stack from C:MobileApp YudaNavigation.tsx: @react-navigation/stack could not be found within the project or in these directories:n node_modulesn .. node_modulesnu001b[0m u001b[90m 1| u001b[39m u001b[36mimportu001b[39m u001b[33mReactu001b[39m u001b[36mfromu001b[39m u001b[32m'react'u001b[39mu001b[33m; u001b[39mn u001b[90m 2 |u001b[39m u001b[36mimportu001b[39m {u001b[33mNavigationContaineru001b[39m} u001b[36mfromu001b[39m u001b[32m'@react-navigation/native'u001b[ 39mu001b[33m;u001b[39mnu001b[31mu 001b[1m>u001b[22mu001b[39mu001b[90m 3 |u001b[39m u001b[36mimportu001b[39m {createStackNavigator}

I hope someone can help with the error in my Android display

2

Answers


  1. It seems like you haven’t installed @react-navigation/stack. Please verify it.

    Login or Signup to reply.
  2. You should see in your package.json that @react-navigation/stack is defined like this;

    "@react-navigation/stack": "^6.3.29"
    

    If you have this and still see this error, try running this on your terminal on the project directory;

    adb reverse tcp:8081 tcp:8081
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search