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

Can not create generated signed apk in React Native

$
0
0

I have a React Native project which runs a device without any error on debugging. Every time I try to create signed release .apk I have the following error

> Task: app: bundleReleaseJsAndAssets FAILEDinternal / modules / cjs / loader.js: 969throw err; ^Error: Cannot find module '/Users/tos/Desktop/Repos/com.tosanalytics.pakodemy/node_modules/@react-native-community/cli/build/bin.js'at Function.Module._resolveFilename(internal / modules / cjs / loader.js: 966: 17)at Function.Module._load(internal / modules / cjs / loader.js: 859: 27)at Function.executeUserEntryPoint[as runMain](internal / modules / run_main.js: 71: 12)at internal / main / run_main_module.js: 17: 47 {  code: 'MODULE_NOT_FOUND',  requireStack: []}

my package.json

{"name": "com.tosanalytics.pakodemy","version": "1.6.6","private": true,"scripts": {"android": "react-native run-android","android-standalone": "react-native run-android --variant=release","android-release": "cd android && ./gradlew bundleRelease","android-clean": "set -ex adb uninstall com.pakodemy; cd android && ./gradlew clean","android-menu": "adb shell input keyevent 82","ios": "react-native run-ios","ios-standalone": "react-native run-ios --configuration=Release --device","start": "react-native start","start-clean": "watchman watch-del-all && react-native start -- --reset-cache","clean": "watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf node_modules && yarn cache clean","test": "jest","lint": "eslint .","ios-install-fix": "rm -rf /usr/local/var/run/watchman && brew uninstall watchman && brew install watchman","create-tag": "git tag -a v2.1.1 -m 'Release'","push-all-with-tags": "git push --follow-tags"  },"dependencies": {"@react-native-community/async-storage": "^1.7.0","@react-native-community/cli": "^4.8.0","@react-native-community/viewpager": "^3.3.0","@react-native-firebase/admob": "^6.3.4","@react-native-firebase/analytics": "^6.3.4","@react-native-firebase/app": "^6.3.4","@react-native-firebase/messaging": "^6.3.4","@react-native-firebase/remote-config": "^6.3.4","@terrylinla/react-native-sketch-canvas": "^0.8.0","add": "^2.0.6","axios": "^0.19.2","moment": "^2.24.0","native-base": "^2.13.8","prop-types": "^15.7.2","react": "^16.13.1","react-devtools": "^4.6.0","react-native": "0.63.0-rc.0","react-native-countdown-component": "^2.6.0","react-native-device-info": "^5.4.0","react-native-fast-image": "^8.1.5","react-native-fbsdk": "^1.1.2","react-native-gesture-handler": "^1.6.0","react-native-iap": "^4.4.2","react-native-image-size": "^1.1.3","react-native-media-controls": "^1.1.1","react-native-modal": "^11.5.4","react-native-orientation-locker": "^1.1.8","react-native-permissions": "^2.1.3","react-native-progress-circle": "^2.1.0","react-native-reanimated": "^1.7.0","react-native-responsive-screen": "^1.4.0","react-native-screens": "^1.0.0-alpha.23","react-native-snap-carousel": "^3.8.4","react-native-svg": "^9.13.6","react-native-vector-icons": "^6.6.0","react-native-video": "^4.4.5","react-native-webview": "^8.1.0","react-navigation": "^4.2.2","react-navigation-stack": "^1.10.3","react-navigation-tabs": "^2.8.2","react-redux": "^7.2.0","recyclerlistview": "^3.0.0","redux": "^4.0.4","redux-devtools-extension": "^2.13.8","stacktrace-parser": "0.1.4","validator": "^12.1.0","yarn": "^1.22.4"  },"devDependencies": {"@babel/core": "^7.8.4","@babel/runtime": "^7.8.4","@react-native-community/eslint-config": "^1.0.0","babel-jest": "^25.1.0","babel-plugin-module-resolver": "^3.2.0","eslint": "^6.5.1","eslint-config-airbnb": "^18.0.1","eslint-import-resolver-babel-module": "^5.1.0","eslint-plugin-import": "^2.18.2","eslint-plugin-jsx-a11y": "^6.2.3","eslint-plugin-module-resolver": "^0.15.0","eslint-plugin-react": "^7.14.3","eslint-plugin-react-hooks": "^1.7.0","jest": "^25.1.0","metro-react-native-babel-preset": "^0.59.0"  },"jest": {"preset": "react-native"  }}

End I have already deleted node_modules a couple times and run npm install. It works fine but I can't create release build. I used Android Studio also to create a release build but the error is the same.


Viewing all articles
Browse latest Browse all 29445

Trending Articles