2
votes

I do run program react-native to use code react-native run-android and npm start but program Error file AndroidManifest, if have a file.

error ENOENT: no such file or directory, open 'app/src/main/AndroidManifest.xml' package.json

    {
  "name": "react-native-inappbrowser-reborn",
  "version": "2.0.4",
  "description": "InAppBrowser for React Native",
  "main": "index.js",
  "readmeFilename": "README.md",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
    "start": "index.js",
  },
  "typings": "./index.d.ts",
  "repository": {
    "type": "git",
    "url": "[email protected]:proyecto26/react-native-inappbrowser.git"
  },
  "bugs": {
    "url": "https://github.com/proyecto26/react-native-inappbrowser/issues"
  },
  "keywords": [
    "react-native",
    "in",
    "app",
    "browser",
    "inappbrowser",
    "in-app-browser"
  ],
  "author": "Juan David Nicholls Cardona",
  "homepage": "https://github.com/proyecto26/react-native-inappbrowser",
  "license": "MIT",
  "peerDependencies": {
    "react-native": ">=0.55.0"
  },
  "dependencies": {
    "invariant": "^2.2.4",
    "react-native": "^0.59.9"
  },
  "devDependencies": {
    "babel-core": "^6.26.0",
    "flow-bin": "^0.80.0"
  }
}

up data

This error is caused by `hasteImpl` returning the same name for different files.
    at setModule (F:\react-hr-and-ess\node_modules\metro\node_modules\jest-haste-map\build\index.js:569:17)
    at workerReply (F:\react-hr-and-ess\node_modules\metro\node_modules\jest-haste-map\build\index.js:641:9)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:16876) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

enter image description hereenter image description here

2

2 Answers

1
votes
  1. (in project directory) mkdir android/app/src/main/assets
  2. react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
  3. react-native run-android

add comma after "test": "echo \"Error: no test specified\" && exit 1",

delete comma after "start": "index.js"

 "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "index.js"
  },

Correct json

    {
  "name": "react-native-inappbrowser-reborn",
  "version": "2.0.4",
  "description": "InAppBrowser for React Native",
  "main": "index.js",
  "readmeFilename": "README.md",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "index.js"
  },
  "typings": "./index.d.ts",
  "repository": {
    "type": "git",
    "url": "[email protected]:proyecto26/react-native-inappbrowser.git"
  },
  "bugs": {
    "url": "https://github.com/proyecto26/react-native-inappbrowser/issues"
  },
  "keywords": [
    "react-native",
    "in",
    "app",
    "browser",
    "inappbrowser",
    "in-app-browser"
  ],
  "author": "Juan David Nicholls Cardona",
  "homepage": "https://github.com/proyecto26/react-native-inappbrowser",
  "license": "MIT",
  "peerDependencies": {
    "react-native": ">=0.55.0"
  },
  "dependencies": {
    "invariant": "^2.2.4",
    "react-native": "^0.59.9"
  },
  "devDependencies": {
    "babel-core": "^6.26.0",
    "flow-bin": "^0.80.0"
  }
}
0
votes

Thanks this helped me too. the entry point is the important for this solution ,if anyone is jr like me

this might help too. enter link description here

My problem originated from after I installed qs.js and stopped it in them middle of install from my git bash window (i was logged in as user from my $path, not explicitly Admin) I ended up doing react-native-clean-project as well , that did not help this specific problem

Not: Win 10, Android Emulator, React-Native-Debugger 0.10.1