Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28469

error Option "--entry-file" is missing. Run CLI with --verbose flag for more details

$
0
0

I tried to install native react and when I enter the command npm run android-windows there;s error.

How to solve this?

This is my packages.json

{ "name": "Fyp", "version": "0.0.1", "private": true, "scripts": { "start": "react-native start", "test": "jest", "lint": "eslint .", "android-windows": "react-native bundle --platform android --dev false npm run android-windows--entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android" }, "dependencies": { "react": "16.8.6", "react-native": "0.60.5" }, "devDependencies": { "@babel/core": "7.5.5", "@babel/runtime": "7.5.5", "@react-native-community/eslint-config": "0.0.3", "babel-jest": "24.9.0", "eslint": "6.3.0", "jest": "24.9.0", "metro-react-native-babel-preset": "0.54.1", "react-test-renderer": "16.8.6" }, "jest": { "preset": "react-native" } }

This is the error

error Option "--entry-file" is missing. Run CLI with --verbose flag for more details. Error: Option "--entry-file" is missing at C:\Users\user\Fyp\node_modules\react-native\node_modules@react-native-community\cli\build\tools\assertRequiredOptions.js:51:13 at Array.forEach () at assertRequiredOptions (C:\Users\user\Fyp\node_modules\react-native\node_modules@react-native-community\cli\build\tools\assertRequiredOptions.js:40:11) at Command.handleAction (C:\Users\user\Fyp\node_modules\react-native\node_modules@react-native-community\cli\build\cliEntry.js:159:42) at Command.listener (C:\Users\user\Fyp\node_modules\commander\index.js:315:8) at Command.emit (events.js:209:13) at Command.parseArgs (C:\Users\user\Fyp\node_modules\commander\index.js:651:12) at Command.parse (C:\Users\user\Fyp\node_modules\commander\index.js:474:21) at setupAndRun (C:\Users\user\Fyp\node_modules\react-native\node_modules@react-native-community\cli\build\cliEntry.js:210:24) at Object.run (C:\Users\user\Fyp\node_modules\react-native\node_modules@react-native-community\cli\build\cliEntry.js:173:11) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! Fyp@0.0.1 android-windows: react-native bundle --platform android --dev false npm run android-windows--entry-file index.js --bundle-output android/app/src/main/ass ets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the Fyp@0.0.1 android-windows script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\user\AppData\Roaming\npm-cache_logs\2019-09-06T15_03_19_543Z-debug.log


Viewing all articles
Browse latest Browse all 28469

Trending Articles