should NOT have additional property ‘nodeModulesPath’ - reactjs

Good afternoon! hope you all in the good condition.
I’ve something to ask, i’ve using react native sdk 41 (after i upgraded my project), and then, when i want to publish using expo build:android -t app-bundle, i got Error looks like this Error: Problem validating fields in app.json. See https://docs.expo.io/workflow/configuration/ • should NOT have additional property 'nodeModulesPath'., when i see my app.json, i’m pretty sure that my app.json is fine (at least in my opinion)
Here’s my app.json:
{
"expo": {
"name": "MyProjectName",
"slug": "MyProjectSlug",
"version": "1.1.2",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "MyProjectScheme",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#393939"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"android": {
"package": "com.mycompany.myprojectpackage"
"versionCode": 31,
"config": {
"googleMobileAdsAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
},
"ios": {
"supportsTablet": true,
"config": {
"googleMobileAdsAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
}
}
}
And here’s my package.json looks like:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo/vector-icons": "^12.0.0",
"#react-native-async-storage/async-storage": "^1.15.4",
"#react-native-community/masked-view": "0.1.10",
"#react-native-community/netinfo": "6.0.0",
"#react-navigation/bottom-tabs": "^5.0.0",
"#react-navigation/native": "^5.0.0",
"#react-navigation/stack": "^5.14.4",
"#react-navigation/web": "~1.0.0-alpha.9",
"axios": "^0.19.2",
"expo": "^41.0.0",
"expo-ads-admob": "~10.0.4",
"expo-asset": "~8.3.1",
"expo-av": "~9.1.2",
"expo-constants": "~10.1.3",
"expo-font": "~9.1.0",
"expo-image-picker": "~10.1.4",
"expo-permissions": "~12.0.1",
"expo-splash-screen": "~0.10.2",
"expo-web-browser": "~9.1.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
"react-native-gesture-handler": "~1.10.2",
"react-native-reanimated": "~2.1.0",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.0.0",
"react-native-svg": "12.1.0",
"react-native-vector-icons": "^6.6.0",
"react-native-web": "~0.13.12",
"react-native-webview": "11.2.3",
"reanimated-bottom-sheet": "^1.0.0-alpha.19"
},
"devDependencies": {
"#babel/core": "~7.9.0",
"babel-preset-expo": "8.3.0",
"jest-expo": "^41.0.0"
},
"private": true
}
Can someone help me about this thing? i really appriciate it :)

Yes, I faced the same issue. So I upgraded the expo-cli using npm install -g expo-cli My expo-cli version is 4.4.4 and I can't see the error anymore.

Em... i think i solved this, not really me, you can see 51194, just doin npm install -g expo-cli

Related

Native Module cannot be null when using react-native-purchases

Trying to run an expo react native project w/ revenue cat integration. Whenever I had the react-native-pruchases library downloaded though, I continue to get this error.
Invariant Violation: Native module cannot be null
I downloaded the library by running npm install react-native-purchases --save, I didn't do any of the additional iOS setup the docs outlined. I've been going crazy over this so some help is appreciated.
package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest"
},
"dependencies": {
"#react-native-community/datetimepicker": "4.0.0",
"#react-native-community/slider": "4.1.12",
"#react-navigation/bottom-tabs": "^6.2.0",
"#react-navigation/native-stack": "^6.4.0",
"dotenv": "^16.0.0",
"expo": "~44.0.0",
"expo-av": "~10.2.0",
"expo-linear-gradient": "~11.0.3",
"expo-status-bar": "~1.2.0",
"firebase": "^9.6.5",
"jest": "26.6.3",
"jest-expo": "^44.0.1",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-circular-progress": "^1.3.7",
"react-native-countdown-circle-timer": "^3.0.9",
"react-native-modal": "^13.0.1",
"react-native-purchases": "^4.6.0",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-web": "0.17.1",
"uuid": "^3.4.0",
"victory-native": "^36.3.0"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#types/jest": "^27.4.0",
"#types/react": "~17.0.21",
"#types/react-native": "~0.64.12",
"react-test-renderer": "^17.0.2",
"typescript": "~4.3.5"
},
"jest": {
"preset": "jest-expo",
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|#react-native(-community)?)|expo(nent)?|#expo(nent)?/.*|#expo-google-fonts/.*|react-navigation|#react-navigation/.*|#unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
]
},
"private": true
}
This error message occurs when trying to use a native module when debugging on the expo go app. The module should work in the standalone app.
You can find other ways to debug with the native modules here https://docs.expo.dev/build/internal-distribution/

When I use metro bundle to run and test the app it works fine. but when I build android apk it not working it restarting again & again

When I use metro bundle to run and test the app it works fine. but when I build android apk it not working it restarting again & again
code
app.json
{
"expo": {
"name": "hawala",
"description": "hawal App",
"slug": "rikshawala",
"privacy": "public",
"platforms": [
"ios",
"android"
],
"android": {
"package": "com.rafi.bbb",
"versionCode": 1
}
},
"notification": {
"icon": "./assets/images/logo96x96.png"
},
"version": "1.0",
"orientation": "portrait",
"icon": "./assets/images/logo1024x1024.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"packagerOpts": {
"config": "metro.config.js"
},
"ios": {
"supportsTablet": true,
"usesAppleSignIn": true,
"bundleIdentifier": "com.rafi.bbb",
"infoPlist": {
"NSLocationAlwaysUsageDescription": "This app uses the always location access in the background for improved pickups and dropoffs, customer support and safety purpose.",
"NSLocationAlwaysAndWhenInUseUsageDescription": "This app uses the always location access in the background for improved pickups and dropoffs, customer support and safety purpose.",
"NSLocationWhenInUseUsageDescription": "This app uses the location to find the Cabs near you.",
"NSCameraUsageDescription": "This app uses the camera to take your profile picture.",
"NSPhotoLibraryUsageDescription": "This app uses Photo Library for uploading your profile picture.",
"ITSAppUsesNonExemptEncryption":false,
"UIBackgroundModes": [
"audio",
"location",
"fetch"
]
},
"config": {
"googleMapsApiKey": "aSyA_u1jnW9UF_76hxCrNFut0"
},
"googleServicesFile": "./GoogleService-Info.plist",
"buildNumber": "1.0"
},
"android": {
"package": "com.rafi.bbb",
"versionCode": 1,
"permissions": [
"CAMERA",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"ACCESS_FINE_LOCATION",
"ACCESS_COARSE_LOCATION",
"CAMERA_ROLL",
"FOREGROUND_SERVICE",
"ACCESS_BACKGROUND_LOCATION"
],
"googleServicesFile": "./google-services.json",
"config": {
"googleMaps": {
"apiKey": "IzaSyA_u1jnWUFxjyYG_76hxuC6jFut0"
}
},
"useNextNotificationsApi": true
},
"facebookScheme": "fb3937477975",
"facebookAppId": "4337477975",
"facebookDisplayName": "Rawala"
}
package.json
{
"name": "mobile-app",
"version": "2.5.0",
"main": "__generated__/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"clear": "expo r -c",
"eject": "expo eject",
"update": "expo update"
},
"dependencies": {
"#firebase/app-types": "^0.6.1",
"#mapbox/polyline": "^1.1.1",
"#react-native-async-storage/async-storage": "^1.13.2",
"#react-native-community/datetimepicker": "3.0.4",
"#react-native-community/masked-view": "0.1.10",
"#react-navigation/native": "^5.7.5",
"assets": "1.0.0",
"common": "1.0.0",
"config": "1.0.0",
"expo": "^40.0.0",
"expo-apple-authentication": "~2.2.2",
"expo-asset": "~8.2.1",
"expo-av": "~8.7.0",
"expo-constants": "~9.3.3",
"expo-crypto": "~8.4.0",
"expo-facebook": "~9.1.0",
"expo-firebase-recaptcha": "^1.1.0",
"expo-font": "~8.4.0",
"expo-image-picker": "~9.2.0",
"expo-location": "~10.0.0",
"expo-notifications": "~0.8.2",
"expo-permissions": "~10.0.0",
"expo-task-manager": "~8.6.0",
"expo-updates": "~0.4.1",
"firebase": "7.9.0",
"haversine": "1.1.1",
"react": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-actions-sheet": "^0.3.5",
"react-native-dash": "0.0.11",
"react-native-elements": "^2.3.2",
"react-native-gesture-handler": "~1.8.0",
"react-native-google-maps-directions": "^2.1.1",
"react-native-google-places-autocomplete": "^1.8.0",
"react-native-maps": "^0.27.1",
"react-native-modal-datetime-picker": "^8.7.1",
"react-native-picker-select": "^7.0.0",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "~2.15.0",
"react-native-segmented-control-tab": "^3.4.1",
"react-native-simple-radio-button": "^2.7.4",
"react-native-star-rating": "^1.1.0",
"react-native-vector-icons": "^7.0.0",
"react-native-webview": "11.0.0",
"react-navigation": "^4.3.7",
"react-navigation-drawer": "^2.4.11",
"react-navigation-stack": "^2.3.11",
"react-redux": "^7.2.0"
},
"devDependencies": {
"#babel/core": "~7.9.0",
"babel-preset-expo": "8.3.0",
"expo-yarn-workspaces": "^1.2.1"
}
}
I used this command to run expo app in production mode.
expo start --no-dev --minify.
you will got exact error
and I get this error
uncaught Error :java.lang.Exception:Faild to load all assetsenter image description here

error while trying to add sign in with google button "RN GoogleSignin native module is not correctly linked..." - react native

I am trying to add a sign-in button of Google, and can't understand why it doesn't work fine. after download the package react-native-google-signin, and I have also installed #react-native-community/google-sign in and these both packaged doesn't work for me. the error message: "RN GoogleSignin native module is not correctly linked..."
code below:
import { GoogleSigninButton } from 'react-native-google-signin';
<GoogleSigninButton
style={{ width: 192, height: 48 }}
size={GoogleSigninButton.Size.Wide}
color={GoogleSigninButton.Color.Dark}
onPress={signInWithGoogle}
/>
my package JSON below:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#expo/vector-icons": "^10.0.6",
"#react-native-community/google-signin": "^3.0.4",
"#react-native-community/masked-view": "^0.1.5",
"expo": "~36.0.0",
"expo-facebook": "~8.0.0",
"expo-google-app-auth": "^8.0.1",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
"react-native-fbsdk": "^1.1.2",
"react-native-gesture-handler": "~1.5.0",
"react-native-google-signin": "^2.1.1",
"react-native-link": "^4.1.0",
"react-native-paper": "^3.6.0",
"react-native-reanimated": "~1.4.0",
"react-native-safe-area-context": "0.6.0",
"react-native-screens": "2.0.0-alpha.12",
"react-native-status-bar-height": "^2.4.0",
"react-native-web": "~0.11.7",
"react-native-webview": "^8.1.2",
"react-navigation": "^4.2.2",
"react-navigation-stack": "^2.2.2",
"react-navigation-tabs": "^2.8.2"
},
"devDependencies": {
"babel-preset-expo": "~8.0.0",
"#babel/core": "^7.0.0"
},
"private": true
}

Why is React Native app not installing after successful build with expo?

After successful building expo app, it wont install in any phone.
This may be very easy but have tried all i know to fix this but didn't work.
This is my craziest experience since i have been working on react...
Below are the steps i take from installing the app to building it
npm install expo-cli --global
expo init my-new-project
cd my-new-project => expo start
npm install -g exp
expo build:android //i choose "Let Expo handle the process!"
Here's my app.json
{
"expo": {
"name": "project",
"slug": "my-new-project",
"privacy": "public",
"sdkVersion": "35.0.0",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.project.test"
},
"android": {
"package": "com.project.test"
}
}
}
Here's my package.json
{
"name": "project",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo/samples": "~3.0.3",
"#expo/vector-icons": "^10.0.3",
"#react-navigation/web": "^1.0.0-alpha.9",
"expo": "^35.0.0",
"expo-asset": "^7.0.0",
"expo-constants": "^7.0.0",
"expo-font": "^7.0.0",
"expo-web-browser": "^7.0.0",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-gesture-handler": "~1.3.0",
"react-native-web": "^0.11.7",
"react-navigation": "^3.12.0"
},
"devDependencies": {
"babel-preset-expo": "^7.0.0",
"jest-expo": "^35.0.0"
},
"private": true
}
Please any help?
Find your way to developer options in your phone settings and disable it as it shows in the picture above.
That's how I solved mine.
Hope that will work for you.

I cannot run React Native app on expo environment on Android

I cannot run React Native app on expo environment on Android; it throws this error when running the app on Expo on my Android phone:
Something went wrong.
32.0.0 is not a valid sdk version. Options are 35.0.0, 34.0.0, 33.0.0, UNVERSIONED.
Same app works perfectly on Expo environment on my iOS phone.
I launch 'expo start' from my MAC and connect both phones to the same WIFI as my MACBOOK PRO.
Here is my app.json file :
{
"expo": {
"name": "travel-management-app",
"slug": "travel-management-app",
"description": "Travel management application",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.0",
"orientation": "portrait",
"primaryColor": "#cccccc",
"icon": "./assets/icons/bg_screen5_square.png",
"splash": {
"image": "./assets/icons/bg_screen5.png"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}
Here is my package.json file :
{
"name": "travel-management-app",
"version": "1.0.0",
"description": "Travel management Application",
"author": "Luchian Chivoiu",
"private": true,
"homepage": "https://www.sienna.ro",
"main": "src/index.native.js",
"dependencies": {
"#babel/polyfill": "^7.2.5",
"#expo/vector-icons": "^9.0.0",
"expo": "^32.0.0",
"expo-linear-gradient": "^3.0.0",
"gh-pages": "^2.0.1",
"lodash": "^4.17.4",
"material-ui": "^0.20.2",
"prop-types": "^15.7.2",
"react": "16.5.0",
"react-art": "^16.8.3",
"react-autowhatever": "^10.2.0",
"react-dom": "^16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-autocomplete-input": "^4.1.0",
"react-native-elements": "^1.0.0-beta8",
"react-native-gesture-handler": "1.0.17",
"react-native-gesture-handler-web": "npm:react-native-gesture-handler#1.1.0",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-picker-select": "^6.3.3",
"react-native-ratings": "^6.3.0",
"react-native-touchable-scale": "2.0.0",
"react-native-vector-icons": "^6.3.0",
"react-native-web": "^0.10.0",
"react-navigation": "^3.5.1",
"react-navigation-animated-switch": "^0.2.1",
"react-redux": "6.0.1",
"react-scripts": "^2.1.5",
"react-select": "^3.0.4",
"redux": "^4.0.4",
"redux-thunk": "^2.3.0"
},
"scripts": {
"web": "react-app-rewired start",
"native": "expo start",
"build:web": "react-app-rewired build",
"deploy": "gh-pages -d build",
"build:android": "expo ba",
"build:ios": "expo bi",
"eject:web": "react-scripts eject",
"eject:native": "expo eject",
"prettify": "prettier --write 'src/**/*.js'",
"clean-install": "rm -rf node_modules && npm cache clean --force && watchman watch-del-all && yarn"
},
"devDependencies": {
"#babel/plugin-proposal-class-properties": "^7.3.4",
"babel-preset-expo": "^5.0.0",
"customize-cra": "^0.2.12",
"prettier": "^1.15.3",
"react-app-rewired": "^2.1.0"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
package-lock.json contains this:
"react-native": {
"version": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"integrity": "sha512-+taJh7bN2owmwaZpJUrNpHdmPAL6ZynNCZj15uLQgjaPFq0ZBIG2ZWuSJ48eGoUjAb3lrWxkmLlHb2eJFXc7sQ==",
How can I make this work on Android too? This app worked on expo on my Android phone some days ago until I did some package update.
I have updated something, some package , a package and maybe that made this Android expo app not able to run.
You are using an outdated Expo SDK and applications, SDK 32 and below is no longer maintained.
Follow the instructions on this link you should be good to go
Hope this Helps!

Resources