The experience you requested uses Expo SDK v(null), but this copy of Expo Client requires at least v35.0.0 - react-native

I decided to return to an Expo app I was developing last year and was using expo-sdk:v33.0.0 and it was working.
I tried to use a solution of Squirrl from similar question, but still no luck. Tried removing node_modules and yarn_install. Here's my package.json:
enter
"dependencies": {
"#react-native-community/masked-view": "^0.1.7",
"#react-navigation/material-bottom-tabs": "^5.1.1",
"#react-navigation/material-top-tabs": "^5.1.1",
"#react-navigation/native": "^5.0.9",
"#react-navigation/stack": "^5.2.3",
"axios": "^0.18.1",
"date-fns": "^1.29.0",
"dotenv": "^8.2.0",
"expo": "^33.0.0",
"expo-font": "~5.0.1",
"lodash": "^4.17.15",
"native-base": "^2.13.1",
"react": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"react-native-gesture-handler": "~1.2.1",
"react-native-modal": "^11.5.4",
"react-native-paper": "^3.6.0",
"react-native-platform-touchable": "^1.1.1",
"react-native-reanimated": "1.0.1",
"react-native-safe-area-context": "^0.7.3",
"react-native-safe-area-view": "^1.0.0",
"react-native-status-bar-height": "^2.1.0",
"react-native-tab-view": "^2.13.0",
"react-native-vector-icons": "^5.0.0",
"react-redux": "^5.1.0",
"redux": "^4.0.1",
"redux-axios-middleware": "^4.0.0",
"redux-persist": "^5.10.0",
"save": "^2.4.0",
"victory-native": "^30.6.0"
"devDependencies": {
"babel-preset-expo": "^5.0.0",
"nodemon": "^2.0.2",
"react-native-dotenv": "^0.2.0"
The app was working with these dependencies that time.
1st issue is that error says Expo SDK v(null). But version is specified in both package.json and app.json.
2nd issue is error says Expo client requires v35.0.0. How can i run the app without upgrading sdk from v33 to v35

This is what worked for me.
Run npm i -g expo-cli (You may have to use sudo if on a Mac. I did.) then run expo upgrade
Follow the prompts and it should work.

Related

requireNativeComponent: "RNSScreen" was not found on the UIManager

I'm trying to make an app with React Native and I've been stuck for hours. Whenever I try to run my app with Android Studio I get the error: "requireNativeComponent: "RNSScreen" was not found on the UIManager". I think I have all the dependencies needed to get NativeModules, here I have all the package.json dependencies:
"#react-native-community/masked-view": "^0.1.11",
"#react-navigation/native": "^6.0.6",
"#react-navigation/stack": "^6.0.11",
"firebase": "^9.1.3",
"react": "17.0.2",
"react-global-hook": "^2.0.0",
"react-native": "0.66.0",
"react-native-ble-manager": "^7.6.3",
"react-native-ble-plx": "^2.0.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.2.3",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^3.8.0",
"react-navigation": "^4.4.4",
"react-navigation-stack": "^2.10.4"
Is there anything else I need to install?
Generally this means that react-native-screens is not installed
Try npm i react-native-screens, but I suggest trying whit the expo managed environment.

Invariant Violation: requireNativeComponent: "VRTImage" was not found in the UIManager

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.

Aws-amplify not working with react-native and expo version 36.0.0

I'm currently working on a react-native-app using expoSdk which is supposed to run on web,ios and android. The most challenging part till now has been to setup the navigation which I finally did. Now I added amplify to my project but the project stops working whenever I run it on any mobile device but it works just fine on web. The error I receive is
NetInfo has been removed from React Native
After a lot of trial and error I discovered that the error comes from aws-amplify since it seems to still run with reac-native-community/netinfo. The error only occours when I import something from amplify. I found this in
node_modules\#aws-amplify\core\lib\Util\Reachability.native.js
Deo anyone know how I can resolve this issue?
Here is my package.json if needed
"dependencies": {
"#expo/vector-icons": "~10.0.0",
"aws-amplify": "^2.2.6",
"#react-native-community/masked-view": "0.1.5",
"#react-navigation/bottom-tabs": "^5.0.0",
"#react-navigation/drawer": "^5.2.0",
"#react-navigation/native": "^5.0.0",
"#react-navigation/stack": "^5.0.0",
"#react-navigation/web": "~1.0.0-alpha.9",
"expo": "~36.0.0",
"expo-asset": "~8.0.0",
"expo-constants": "~8.0.0",
"expo-font": "~8.0.0",
"expo-web-browser": "~8.0.0",
"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-gesture-handler": "~1.5.0",
"react-native-reanimated": "^1.7.0",
"react-native-safe-area-context": "0.6.0",
"react-native-screens": "2.0.0-alpha.12",
"react-native-web": "~0.11.7",
"react-spring": "^8.0.27",
"styled-components": "^5.0.1",
"#aws-amplify/api": "^2.1.6",
"#aws-amplify/pubsub": "^2.1.7",
"#expo/samples": "^3.0.3",
"apollo-boost": "^0.4.3",
"apollo-cache-inmemory": "^1.6.2",
"apollo-client": "^2.6.3",
"apollo-link-http": "^1.5.15",
"aws-amplify-react-native": "^3.2.2",
"aws-appsync": "^1.7.0",
"aws-appsync-react": "^1.2.5",
"expo-av": "~8.0.0",
"expo-camera": "~8.0.0",
"expo-file-system": "~8.0.0",
"expo-image-picker": "~8.0.1",
"expo-permissions": "~8.0.0",
"graphql-tag": "^2.10.1",
"moment": "^2.20.1",
"prop-types": "^15.7.2",
"react-apollo": "^2.0.4",
"react-native-datepicker": "^1.7.2",
"react-native-deck-swiper": "^1.6.7",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-material-dropdown": "^0.11.1",
"react-native-modal": "^11.3.1",
"react-native-modal-datetime-picker": "^4.13.0",
"react-native-modal-dropdown": "^0.6.2",
"react-native-paper": "^2.16.0",
"react-native-responsive-screen": "^1.4.0",
"react-native-segmented-control-tab": "^3.4.1",
"react-native-slideable-calendar-strip": "^0.4.0",
"react-native-snap-carousel": "^3.8.0",
"react-native-sound": "^0.11.0",
"react-native-svg": "9.13.3",
"react-native-swipe-gestures": "^1.0.3",
"react-native-swipeable": "^0.6.0",
"react-native-swipeout": "^2.3.3",
"react-native-touchable-swipe": "^1.0.0",
"react-navigation": "^4.2.2",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-persist": "^4.10.2",
"redux-thunk": "^2.3.0",
"uuid": "^3.2.1"
},
Any help is much appreciated thanks.
Incase someone has this issue this is the solution by #Ashish-Nanda on github:
The issue you linked has a reply from the package maintainer with the reason for the error.
It is likely that one or more of your dependencies is importing NetInfo from React Native core. Looking at your package.json, one of these would be aws-appsync-react where you will need to upgrade to any version above 2.x.x. Remove both aws-appsync-react and aws-appsync from your package.json and install the latest versions (ensure its above 2.x.x). And then do:
npm install --save #react-native-community/netinfo#4.7.0
You need to install this specific version because newer versions cause issues as the API changed.

get warning "componentWillReceiveProps has been renamed" after moving expo project to react native

I migrate my expo project to react native project.
I removed expo and i tried to use the native way to add splash screen and push notifications and to add fonts without expo.
I also installed react navigation with the native way without expo.
I run the project using android studio and Xcode.
I have some problems but i fixed them by fixing some packages versions in my package.json file
Now i get this error :
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See ... for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: ***
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: SafeView
my old packeges file :
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-
33.0.0.tar.gz",
"react-native-autocomplete-input": "^4.1.0",
"react-native-elements": "^1.1.0",
....
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-navigation-material-bottom-tabs": "^1.0.0",
"react-navigation-stack": "^1.10.3",
My current version use safe area context with react navigation :
"dependencies": {
"#react-native-community/async-storage": "^1.7.1",
"#react-native-community/masked-view": "^0.1.6",
"#react-native-community/push-notification-ios": "^1.0.6",
"axios": "^0.19.0",
"buffer": "^5.4.3",
"color": "^3.1.2",
"libphonenumber-js": "^1.7.26",
"moment": "^2.24.0",
"native-base": "^2.13.5",
"native-base-autocomplete": "^1.3.2",
"querystring": "^0.2.0",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-elements": "^1.1.0",
"react-native-event-source": "^1.1.0",
"react-native-gesture-handler": "^1.5.6",
"react-native-globalize": "^3.0.0",
"react-native-material-textfield": "^0.16.1",
"react-native-modal-selector": "^1.1.1",
"react-native-paper": "^2.16.0",
"react-native-push-notification": "^3.1.9",
"react-native-reanimated": "^1.0.1",
"react-native-responsive-ui": "^2.1.1",
"react-native-root-toast": "^3.1.2",
"react-native-safe-area-context": "^0.7.2",
"react-native-screens": "^2.0.0-beta.2",
"react-native-slider": "^0.11.0",
"react-native-splash-screen": "^3.2.0",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-navigation-material-bottom-tabs": "^1.0.0",
"react-navigation-stack": "^1.10.3",
"react-redux": "^7.1.0",
"redux": "^4.0.4",
"redux-devtools": "^3.5.0",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0",
"search-params": "^2.1.3",
"whatwg-url": "^8.0.0"
},
In your case actually this is not an error. This is a warning from react native.
componentWillReceiveProps is a synchronous hook. Calling asynchronous function like data fetching inside this hook will need to render in between when the new props are set and when data has finished loading.
Thus, componentWillReceiveProps is being deprecated in favor of the following reason:
Use componentDidUpdate
So, I suggest you to use componentDidUpdate hook as far as possible and update your code.
The similar things happen when comparing componentWillMount and componentDidMount. Use componentDidMount whenever you need operate async operation and forget componentWillMount at all condition.
You should find the package from which SafeView object used.
-import SafeView from "......."-
Then you can find this package folder from node_modules folder.
Then you should search the code and find "componentWillReceiveProps".
Rename this to UNSAFE_componentWillReceiveProps as declared in the warning.
It worked on the same problem with my app. Happy coding!
I fixes this warning by reinstalling the navigation and the dependencies that used, so my current packages files is :
"#react-native-community/async-storage": "^1.7.1",
"#react-native-community/masked-view": "^0.1.6",
"#react-native-community/push-notification-ios": "^1.0.6",
"axios": "^0.19.0",
"buffer": "^5.4.3",
"color": "^3.1.2",
"libphonenumber-js": "^1.7.26",
"moment": "^2.24.0",
"native-base": "^2.13.5",
"native-base-autocomplete": "^1.3.2",
"querystring": "^0.2.0",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-elements": "^1.1.0",
"react-native-event-source": "^1.1.0",
"react-native-gesture-handler": "^1.5.6",
"react-native-globalize": "^3.0.0",
"react-native-material-textfield": "^0.16.1",
"react-native-modal-selector": "^1.1.1",
"react-native-paper": "^3.6.0",
"react-native-push-notification": "^3.1.9",
"react-native-reanimated": "^1.7.0",
"react-native-responsive-ui": "^2.1.1",
"react-native-root-toast": "^3.1.2",
"react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^2.0.0-beta.2",
"react-native-slider": "^0.11.0",
"react-native-splash-screen": "^3.2.0",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^4.1.1",
"react-navigation-drawer": "^2.3.4",
"react-navigation-material-bottom-tabs": "^2.1.5",
"react-navigation-stack": "^2.1.1",
"react-redux": "^7.1.0",
"redux": "^4.0.4",
"redux-devtools": "^3.5.0",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0",
"search-params": "^2.1.3",
"whatwg-url": "^8.0.0"
thanks to everyone

undefined is not an object (evaluating 'viewConfig.Manager')

Im trying to upgrade expo sdk from version 33 to 34 and getting undefined is not an object (evaluating 'viewConfig.Manager') inside react-native package
package.json
"date-fns": "^2.0.1",
"eslint-plugin-react-hooks": "^1.7.0",
"expo": "^34.0.1",
"expo-analytics-amplitude": "~5.0.1",
"expo-asset": "^5.0.1",
"expo-constants": "^6.0.0",
"expo-font": "~5.0.1",
"expo-intent-launcher": "^6.0.0",
"expo-keep-awake": "~5.0.1",
"expo-linear-gradient": "~5.0.1",
"expo-localization": "~5.0.1",
"expo-location": "^5.0.1",
"expo-permissions": "^6.0.0",
"expo-yarn-workspaces": "^1.1.0",
"i18n-js": "3.2.2",
"pomeranian-durations": "^1.8.1",
"prop-types": "15.7.2",
"react": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
"react-native-app-intro-slider": "^3.0.0",
"react-native-gifted-chat": "0.9.0",
"react-native-keyboard-spacer": "^0.4.1",
"react-navigation": "^3.9.1",
"react-redux": "6.0.1",
"redux": "^4.0.1",
"redux-devtools-extension": "2.13.8",
"redux-logger": "3.0.6",
"redux-optimist": "^1.0.0",
"redux-sentry-middleware": "^0.1.1",
"redux-persist": "6.0.0",
"redux-thunk": "2.3.0",
"sentry-expo": "2.0.0",
"styled-components": "^4.2.0",
"synced-interval": "^0.2.0"
I was struggling with the same issue for the last two hours.
In my case there were some outdated libraries (including one I authored) using the old version of react-native which somehow causes this error.
Try running:
npm outdated
And then install new versions of outdated libraries listed using expo-cli one by one.
Hope this helps :)