Error when expo start in react native application (Stylesheet) - reactjs

I'm making a react native application and there is an error that is making me sick.
Could anyone help me?
The error is shown below.
Dependencies:
{
"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": {
"#material-ui/core": "^4.11.0",
"#material-ui/icons": "^4.9.1",
"#react-native-community/async-storage": "^1.12.1",
"#react-native-community/masked-view": "^0.1.10",
"expo": "~39.0.2",
"expo-status-bar": "~1.0.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz",
"react-native-animatable": "^1.3.3",
"react-native-elements": "^2.3.2",
"react-native-gesture-handler": "^1.8.0",
"react-native-safe-area-context": "^3.1.8",
"react-native-safe-area-view": "^1.1.1",
"react-native-snackbar": "^2.2.3",
"react-native-vector-icons": "^7.1.0",
"react-native-web": "~0.13.12",
"react-navigation": "^4.4.2",
"react-navigation-stack": "^2.8.4"
},
"devDependencies": {
"#babel/core": "~7.9.0"
},
"private": true
}
Thanks!

It seems to be an error in case, it should be StyleSheet and not Stylesheet

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/

Problem with expo, util couldnt be found within the project

Error output
got error and couldnt get it fixed idk whats problem last thing i remember was installing latest version of npm, after that rolled back and installed everything with old package.json but cant get this fixed. this is my 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"
},
"dependencies": {
"#brainsbeards/react-native-animated-code-input": "^1.0.1",
"#expo-google-fonts/inter": "^0.2.0",
"#react-native-async-storage/async-storage": "~1.15.0",
"#react-native-community/slider": "^3.0.3",
"#react-navigation/bottom-tabs": "^6.0.1",
"#react-navigation/native": "^6.0.1",
"#react-navigation/stack": "^6.0.1",
"axios": "^0.21.1",
"expo": "~42.0.1",
"expo-app-loading": "^1.1.2",
"expo-av": "^9.2.3",
"expo-blur": "^9.0.3",
"expo-clipboard": "^1.1.0",
"expo-font": "~9.2.1",
"expo-status-bar": "~1.0.4",
"jwt-decode": "^3.1.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
"react-native-easy-grid": "^0.2.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-render-html": "^6.0.5",
"react-native-toast-message": "^1.4.9",
"react-native-web": "^0.17.1",
"react-native-webview": "^11.6.6",
"react-query": "^3.19.2",
"zustand": "^3.5.7"
},
"devDependencies": {
"#babel/core": "^7.9.0"
},
"private": true
}
I had similar issue. Was able to remedy my situation but installing the util package.
https://www.npmjs.com/package/util

redux-form-material-ui for react-native

So I've implemented redux-form in my react native application and it works fine. Now, Client has asked if we could change normal field to material-ui like this, I tried implementing redux-form-material-ui in my react native application but it doesn't work. Here is the error which i got while running my application.
error: Error: Unable to resolve module `material-ui/Toggle` from `node_modules/redux-form-material-ui/lib/Toggle.js`: material-ui/Toggle could not be found within the project.
This is my package.Json
{
"name": "Demo",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#material-ui/core": "^4.9.10",
"react": "16.11.0",
"react-native": "0.62.1",
"react-native-flash-message": "^0.1.15",
"react-native-gesture-handler": "^1.6.1",
"react-native-linear-gradient": "^2.5.6",
"react-native-reanimated": "^1.7.1",
"react-native-router-flux": "^4.2.0",
"react-native-screens": "^2.4.0",
"react-native-touch-id": "^4.4.1",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-form": "^8.3.2",
"redux-form-material-ui": "^4.3.4",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"#babel/core": "7.9.0",
"#babel/runtime": "7.9.2",
"#react-native-community/eslint-config": "0.0.5",
"babel-jest": "24.9.0",
"eslint": "6.8.0",
"jest": "24.9.0",
"metro-react-native-babel-preset": "0.58.0",
"react-test-renderer": "16.11.0"
},
"jest": {
"preset": "react-native"
}
}
So, My question is can we implement redux-form-material-ui for React-Native or it is limited to reactjs. if yes then can anyone tell what is the problem here?
redux-form-material-ui has not been updated in a very long time and Toggle is not supported.

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
}

Unable to resolve "./components/connect" from "node_modules/react-redux/lib/index.js"

I have initialized a new react-native app using expo-cli.
After installing few dependencies, I got this error on build:
Unable to resolve "./components/connect" from "node_modules/react-redux/lib/index.js"
Here is my package.json file.
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"dependencies": {
"eslint-config-rallycoding": "^3.2.0",
"expo": "^32.0.0",
"firebase": "^5.10.0",
"lodash": "^4.17.11",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-communications": "^2.2.1",
"react-native-router-flux": "^4.0.6",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0"
},
"private": true
}
I have been able to fix this issue by downgrading react-redux to version ^4.4.10

Resources