So far, I have not had any problems getting the output of the application, but now
I'm trying to get assembleRelease and show me this error:
> Task :app:lintVitalRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':react-native-screens:releaseRuntimeClasspath'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :react-native-screens
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
> Could not HEAD 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
this is my package.json:
"dependencies": {
"#react-native-async-storage/async-storage": "^1.15.14",
"#react-navigation/bottom-tabs": "^6.0.7",
"#react-navigation/native": "^6.0.6",
"#react-navigation/native-stack": "^6.2.5",
"apisauce": "^2.1.1",
"i18next": "^21.5.3",
"link": "^0.1.5",
"react": "17.0.2",
"react-i18next": "^11.14.3",
"react-native": "^0.66.3",
"react-native-circular-progress": "^1.3.7",
"react-native-flash-message": "^0.2.0",
"react-native-localize": "^2.1.5",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.9.0",
"react-redux": "^7.2.6",
"react-router-native": "^6.0.2",
"redux": "^4.1.2",
"redux-thunk": "^2.4.1",
"styled-components": "^5.3.3"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/runtime": "^7.12.5",
"#react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.66.2",
"react-test-renderer": "17.0.2"
},
anybody can help me?
Bin tray is experiencing "intermittent issues" on their download network :
https://status.bintray.com/
Also if you are using obselete jCenter(), then replace it with mavenCentral() in your android/build.gradle
Related
this react native app was working perfectly and a week or so ago it just start throwing this arror cannot read properties of undefined (reading '1')at plugin.manipulateoptions.
you can view more detail in the attached photo here error message
Here is my package json:
"dependencies": {
"#react-native-async-storage/async-storage": "^1.17.11",
"#react-navigation/bottom-tabs": "^6.5.1",
"#react-navigation/drawer": "^6.5.5",
"#react-navigation/native": "^6.1.1",
"#react-navigation/stack": "^6.3.9",
"dayjs": "^1.11.7",
"express": "^4.18.2",
"firebase": "^9.15.0",
"morgan": "^1.10.0",
"peerjs": "^1.4.7",
"react": "18.1.0",
"react-native": "^0.70.6",
"react-native-animatable": "^1.3.3",
"react-native-dotenv": "^3.4.7",
"react-native-event-listeners": "^1.0.7",
"react-native-gesture-handler": "^2.8.0",
"react-native-incall-manager": "^4.0.1",
"react-native-paper": "^5.0.2",
"react-native-reanimated": "^2.13.0",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2",
"react-native-slider": "^0.11.0",
"react-native-track-player": "^3.2.0",
"react-native-vector-icons": "^9.2.0",
"react-native-webview": "^11.26.0",
"socket.io": "^4.5.4",
"socket.io-client": "^4.5.4"
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/preset-flow": "^7.0.0",
"#babel/runtime": "^7.20.7",
"#react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^29.3.1",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro": "^0.73.7",
"metro-core": "^0.73.7",
"metro-react-native-babel-preset": "^0.73.7",
"react-test-renderer": "18.1.0"
},
I've tried uninstall nodemodule and packagelock, I even initialize another application, I upgraded babel plugins, but none of it works.
After upgrading React Native from 0.67.4 to 0.68.0 on Big Sur, react-native run-android shows a red screen on android studio 2021.1.1 Patch 2 emulator after launch. And can not find #babel/preset-typescript.
error: node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: /Users/macair/Documents/code/js/xyz_app6/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: Cannot find module '#babel/preset-typescript'
Require stack:
- /Users/macair/Documents/code/js/xyz_app6/node_modules/#babel/core/lib/config/files/plugins.js
- /Users/macair/Documents/code/js/xyz_app6/node_modules/#babel/core/lib/config/files/index.js
- /Users/macair/Documents/code/js/xyz_app6/node_modules/#babel/core/lib/index.js
- /Users/macair/Documents/code/js/xyz_app6/node_modules/metro-transform-worker/src/index.js
- /Users/macair/Documents/code/js/xyz_app6/node_modules/metro/src/DeltaBundler/Worker.js
- /Users/macair/Documents/code/js/xyz_app6/node_modules/jest-worker/build/workers/processChild.js
BUNDLE ./index.js
Here is the screen shot:
Here is the portion of package.json:
"dependencies": {
"#ethersproject/shims": "^5.6.0",
"#react-native-community/toolbar-android": "^0.2.1",
"#react-native-masked-view/masked-view": "^0.2.6",
"#react-native-picker/picker": "^2.4.0",
"#react-navigation/native": "^6.0.8",
"#react-navigation/stack": "^6.1.1",
"crypto-js": "^4.1.1",
"ethers": "^5.6.1",
"react": "17.0.2",
"react-native": "0.68.0",
"react-native-blob-util": "^0.14.1",
"react-native-confirmation-code-field": "^7.3.0",
"react-native-device-info": "^8.5.1",
"react-native-easy-grid": "^0.2.2",
"react-native-elements": "^3.4.2",
"react-native-encrypted-storage": "^4.0.2",
"react-native-flash-message": "^0.2.1",
"react-native-gesture-handler": "^2.3.2",
"react-native-get-random-values": "^1.7.2",
"react-native-gifted-chat": "^0.16.3",
"react-native-image-picker": "^4.7.3",
"react-native-loading-spinner-overlay": "^3.0.0",
"react-native-modal": "^13.0.1",
"react-native-reanimated": "^2.5.0",
"react-native-redash": "^16.2.3",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "^4.2.2",
"react-native-screens": "^3.13.1",
"react-native-vector-icons": "^9.1.0",
"rn-alioss": "^0.2.5",
"socket.io-client": "^4.4.1"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/runtime": "^7.12.5",
"#react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "7.14.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.66.2",
"react-test-renderer": "17.0.2"
},
I can yarn add #babel/preset-typescript -D but is there way to fix the error without explicitly adding #babel/preset-typescript?
I have some issues with my react native VR/AR.
I used the react-viro module.
Here are my code and error.
import {
ViroScene,
ViroImage,
Viro360Image
} from 'react-viro';
<ViroScene style={[S.container]}>
<Viro360Image source={require("../../assets/ar/res/guadalupe_360.jpg")} onLoadEnd={console.log('image is loaded successfully.')}/>
<ViroImage
position={[0, 0, -5]} source={require("../../assets/ar/res/grid_bg.jpg")} scale={[.1, .1, .1]}
opacity={0.0} onClick={this._onTitleClicked}
animation={{
name : "showTitleAnimation",
run : this.state.runShowTitleAnimation,
loop : false,
}} />
</ViroScene>
and here is my package.json
{
"scripts": {
"start": "expo start",
"web": "expo start --web",
"build": "expo build:android",
"build:ios": "expo build:ios",
"fingerprint": "expo fetch:android:hashes"
},
"dependencies": {
"#chartiful/react-native-chart-builder": "^0.1.8",
"#chartiful/react-native-vertical-bar-graph": "^0.1.2",
"#miblanchard/react-native-slider": "^1.5.0",
"#react-native-community/masked-view": "^0.1.10",
"axios": "^0.21.1",
"expo": "^40.0.0",
"expo-font": "~8.4.0",
"expo-image-picker": "~9.2.1",
"expo-linear-gradient": "~8.4.0",
"expo-splash-screen": "~0.8.1",
"firebase": "7.9.0",
"lodash": "^4.17.20",
"moment": "^2.29.1",
"native-base": "^2.15.2",
"prop-types": "^15.7.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-chart-kit": "^6.11.0",
"react-native-country-picker-modal": "^2.0.0",
"react-native-display-keyboard": "^0.2.0",
"react-native-easy-grid": "^0.2.2",
"react-native-geocoding": "^0.5.0",
"react-native-gesture-handler": "~1.8.0",
"react-native-google-places-autocomplete": "^2.1.3",
"react-native-maps": "0.27.1",
"react-native-maps-directions": "^1.8.0",
"react-native-modal": "^11.6.1",
"react-native-normalize": "^1.0.1",
"react-native-phone-input": "^0.2.4",
"react-native-progress-circle": "^2.1.0",
"react-native-screens": "^2.15.2",
"react-native-slider": "^0.11.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-steps": "^1.3.0",
"react-native-svg": "^12.1.0",
"react-native-swiper": "^1.6.0",
"react-native-timeago": "^0.5.0",
"react-navigation": "^4.4.3",
"react-navigation-stack": "^2.10.2",
"react-redux": "^7.2.2",
"react-viro": "^2.17.0",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"rn-range-slider": "^2.0.4"
},
"devDependencies": {
"#babel/core": "~7.12.10",
"babel-jest": "~26.6.3",
"babel-preset-expo": "8.3.0",
"jest": "~26.6.3",
"react-test-renderer": "~17.0.1"
},
"private": true,
"name": "guix",
"version": "1.0.0"
}
I tried other modules and it returns the same error.
I tried the "react-native-360" and "react-native-vr"
Also, now this is expo but I tried this on react-native-cli also. but same was true. What is the VRTImage?
Why I get this error and what is the solution?
Here is my error
I am not sure i am completely Correct or not, But i face same situation recently and when i go through react-viro docs.
i get to know few things.
react-viro basically build on react-native version .59
gradle build and sdk version is about 28.0.3
android manifest file should be updated using setup-ide.sh android command file is available in nodemodules/react-viro/bin/js or you can manually update too! you can get docs from react-viro docs
https://docs.viromedia.com/docs/installing-viro-android
So the issue begins here new SDK Version is not supporting dependencies of react-viro and we may not be able to found effective solution or even solution(on basis of my current Research).
And Apart of that expo have not added react-viro ! So either way using expo it is impossible for now.
This is What i learned from R and D and changing gradle Version and Package version accordingly and it is became very difficult to build with downgrading react-native and sdk and gradle version and ofcource dependency of all packages that we are going to use.
When I follow the instruction from https://reactnavigation.org/docs/en/getting-started.html
and run the application, I have this error
Requiring module "node_modules/react-native-gesture-handler/index.js", which threw an exception: TypeError:
"dependencies": {
"react": "^16.8.6",
"react-art": "^16.6.3",
"react-dom": "16.8.6",
"react-native": "^0.59.8",
"react-native-gesture-handler": "^1.2.2",
"react-native-modal-selector": "^1.0.3",
"react-native-vector-icons": "^6.1.0",
"react-native-web": "0.11.2",
"react-navigation": "^3.0.0"
},
"resolutions": {
"uglify-es": "3.2.2"
},
"devDependencies": {
"#types/jest": "24.0.12",
"#types/node": "^10.12.12",
"#types/react": "16.8.15",
"#types/react-dom": "^16.0.11",
"#types/react-native": "^0.57.60",
"#types/react-navigation": "^3.0.7",
"#types/react-test-renderer": "16.8.1",
"babel-jest": "24.7.1",
"jest": "24.7.1",
"metro-react-native-babel-preset": "0.50.0",
"prettier": "1.17.0",
"react-art": "16.8.6",
"react-native-typescript-transformer": "^1.2.10",
"react-scripts": "3.0.0",
"react-scripts-ts": "^3.1.0",
"react-test-renderer": "16.8.6",
"ts-jest": "24.0.2",
"tslint": "5.16.0",
"tslint-config-prettier": "1.18.0",
"typescript": "3.4.5"
},
You need to install react-native-gesture-handler package to make it works npm install --save react-native-gesture-handler and link it.
Complete installation guide can be found here: https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html
I upgraded my react native application from 0.48.3 to 0.59.8 everything works fine until lauching the emulator . Then this error appears :
error: bundling failed: Error: Unable to resolve module
`#babel/runtime/helpers/interopRequireDefault` from
`E:\als\variant\generic\index.android.js`: Module
`#babel/runtime/helpers/interopRequireDefault` does not exist in the
Haste module map
Here is my Package.json :
"dependencies": {
"#babel/polyfill": "^7.4.4",
"#babel/runtime": "^7.0.0-beta.55",
"babel-loader": "^8.0.5",
"content-disposition": "^0.5.2",
"core-js": "^3.0.1",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-loader": "^2.4.5",
"react-native": "0.59.8",
"react-redux": "^5.0.6",
"react-router-dom": "^5.0.0",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",
},
"devDependencies": {
"#babel/plugin-proposal-class-properties": "^7.4.4",
"#babel/plugin-proposal-decorators": "^7.4.4",
"#babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"#babel/plugin-transform-block-scoping": "^7.0.0",
"#babel/plugin-transform-flow-strip-types": "^7.4.4",
"#babel/plugin-transform-react-jsx-source": "^7.2.0",
"#babel/plugin-transform-runtime": "^7.4.4",
"#babel/preset-env": "^7.4.3",
"#babel/preset-flow": "^7.0.0",
"#babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.8.0",
"babel-preset-react-native": "^5.0.2",
}
I have tried all solutions found in similar questions but not working .Have you any idea please ?
Try to reset cache with
npm run start --reset-cache
I faced this same issue and no solutions mentioned on the threads worked. However I was finally able to solve it by removing and re-installing the global version of react-native:
npm uninstall react-native -g
npm install react-native#latest -g
And the error then disappeared when I re-ran:
react-native start