How to open js debugger in react native app

72 views Asked by At

I'm new to react native and my goal was to open debugger js in browser. I'm currently setting up my development environment and have encountered a debugging problem.

It is my app.json

{
  "expo": {
    "jsEngine": "hermes",
    "name": "todo-list",
    "slug": "todo-list",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#ffffff",
      }
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}

package-json

{
  "name": "todo-list",
  "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"
  },
  "dependencies": {
    "@expo/webpack-config": "^19.0.0",
    "@react-native-async-storage/async-storage": "1.18.2",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/native-stack": "^6.9.17",
    "expo": "~49.0.15",
    "expo-status-bar": "~1.6.0",
    "nativewind": "^2.0.11",
    "postcss": "^8.4.23",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-hook-form": "^7.49.2",
    "react-native": "0.72.6",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-safe-area-context": "^4.6.3",
    "react-native-screens": "~3.22.0",
    "react-native-vector-icons": "^10.0.3",
    "react-native-web": "~0.19.6"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@types/react": "~18.2.14",
    "@types/react-native": "^0.73.0",
    "@types/react-native-vector-icons": "^6.4.18",
    "@typescript-eslint/eslint-plugin": "^6.16.0",
    "@typescript-eslint/parser": "^6.16.0",
    "eslint": "^8.56.0",
    "eslint-plugin-react": "^7.33.2",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-react-native": "^4.1.0",
    "react-devtools": "^5.0.0",
    "tailwindcss": "^3.3.2",
    "typescript": "^5.3.3"
  },
  "private": true
}

When I try to open debugger through my iphone or console in my idea, I get error "Failed to fetch source map http://192.168.1.10:19000/node_modules\expo\AppEntry.map?platform=ios&dev=true&hot=false&strict=false&minify=false: remote fetches not permitted". Actually dont have any idea why there is such an error

0

There are 0 answers