How to solve this error, Uncaught Error: 36.0.0 is not a valid SDK version. Options are 35.0.0, 34.0.0, 33.0.0, UNVERSIONED - react-native

I am working on React native new project when I enter npm start I got this error on my Mobile with blue screen Uncaught Error: 36.0.0 is not a valid SDK version. Options are 35.0.0, 34.0.0, 33.0.0, UNVERSIONED. I tried to solve this error by using these commands
npm install (for node module)
expo update
npm install react-native-gesture-handler --save
npm start
But It didn't work, please help me to resolve this issue.

As said here, you can try to delete the expo client on the emulator, and run the project again. This should work.
Here's the documentation of how to upgrade your expo version, but i think you don't will need it, because you're on the latest version.

Related

expo cli warning: 'unrecognised event type: transformer_load_started

I'm getting a weird warning when I start newly created expo projects using expo init and expo start. The project loads and I am able to work, but I get this warning:
Unrecognized event: {"type":"transformer_load_started"}
Unrecognized event: {"type":"transformer_load_done"}
I have no idea what this means or what caused this. When I load up older projects using expo start, I do not get this error.
Any ideas on how to fix this? Thanks.
I have the same issue with just a simple project.
With some experimentation, I found that it caused by my Expo version which is "expo": "^45.0.0" in packages.json
Initializing your new projects with Expo SDK 44 by using this command should fix the issue:
expo init --template blank#44.0
Maybe it will be fixed in a Expo SDK 45 update.
EDIT:
I updated expo-cli to the last version (5.4.12) with npm install -g expo-cli and it fixed the issue with Expo 45.

Warning: Invalid version react-native#0.64.2 for expo sdkVersion 43.0.0. Use react-native#0.64.3

I am working on an expo project and everything is working fine, but I began to get a warning message when android is building as
Warning: Invalid version react-native#0.64.2 for expo sdkVersion 43.0.0. Use react-native#0.64.3
The app is still running fine but I don't how to fix this error yet and I want to know if it won't cause an issue later.
I have tried to run npx react-native upgrade 0.64.3 but it didn't work, I got this error
info Fetching diff between v0.64.2 and v0.64.3... error Fetch request
failed with status 404: 404: Not Found. error Failed to fetch diff for
react-native#0.64.3. Maybe it's not released yet?
changing the version of react-native manually in the package.json and run expo install worked for me
I use the expo doctor command it allows diagnose issues with the project.
I would recommend using the expo upgrade command. It upgrades the project packages and config for the given SDK version.
More to find here.
I just faced the same issue. Basically it's telling you should use a higher version of your react-native. I solved it just by updating it to the specified version.
npx react-native upgrade 0.64.3
More info here.
Cheers,
If as in my case one need a specific version of react-native, let's say older because some legacy dependencies in a particular project that for some reason can't be upgrade, then change the version in the package.json won't work.
What worked as the cli suggested is to use:
expo doctor --fix-dependencies
That installed the correct lower version of react-native
To find out actual problems run this command :
expo doctor
To solve all problems regarding package conflicts run this command:
expo doctor --fix-dependencies
Use sudo on Unix based OS if you have permission issue to run those commands.
To solve the error, I used the below command:
npm install react-native-clean-project --save-dev
It is a library that allows us to resolve conflicts.
This library is added to your dependencies.
This handles the problem and if it is not the case add this command:
react-native clean-project-auto

How to fix this error while installing a module with expo

I'm trying to install a module (DateTimePicker for Expo).
Accordingly to documentation we have to use the following command:
expo install #react-native-community/datetimepicker
However, when executing that command, this error appears
This is not related to expo, is because you are using the new npm dependencies.
So you only need to follow the error message
expo install #react-native-community/datetimepicker --legacy-peer-deps

Struggling to set up nativebase in a React Expo project

I have tried so many different ways to set nativebase up with expo and am still having an issue. At the moment I'm using the
Getting Started documentation found on the nativebase website.
I first create a new app with expo using
expo init myapp
Then I install nativebase using
npm install native-base --save
Then I finally install the font
expo install expo-font
I even copy the App.js found in the getting started documentation, and after I start the app and try to run it on an emulator I face the below error
Unable to resolve "#expo/vector-icons/Fontisto" from "node_modules\native-base\dist\src\basic\IconNB.js"
Failed building JavaScript bundle.
What am I missing? Coming from .NET world this whole process with dependencies is so painful...
*Edit 1
I'm sure someone will make mention of the fact that the error message mentions #expo/vector-icons and I have not installed that. When running before I install this package I get that error, and after I install the mentioned package I still face the exact same error.
Please try with this version of native base :
npm i --save-exact native-base#2.13.8
Expo should release a version with that version .
Hope it helps. feel free for doubts
We can run the below command with Expo
npm i --save-exact native-base#2.13.8
Still this version is not available, but its working, really don't know why?

Cannot find module 'expo/bundleNativeModules.json'

I'm using expo to build an app. I'm new to React-Native and expo so if you could help me, I'd be really appreciated.
I get a couple of warnings that says:
Some of your project's dependencies are not compatible with currently installed expo package version
- expo-constants - expected version range: ...
- expo-permissions - expected version range: ...
- react-native-gesture-handler - expected version range: ...
Your project may not work correctly until you install the correct versions of the packages.
I was facing another error:
"TypeError: TypeError: undefined is not an object (evaluating '_styles.default.list')".
So I'm trying to install the latest version.
When I try to install expo install expo-permissions and expo install react-native-gesture-handler, I get errors.
Both errors say
Cannot find module 'expo/bundledNativeModules.json'
Require stack:
- /Users/address/src/react-native-udacicards/noop.js
I tried to remove node_modules and package-lock.json then npm install.
rollback with npm install -g expo-cli#2.4.3
I don't know if this solution will work for all the situations, but this is what fixed the issue it for me:
clean the npm cache using the following command : npm cache clean --force
re-install the dependencies : npm install
expo install
I hope it helps
1.on your package.json change expo version to
"expo": "~43.0.2", (or lower)
and your react-native-gesture-handler to
"react-native-gesture-handler": "~1.10.2",
(for expo 43.0.2)
Then, on your terminal (in your project), run
npm cache clean --force
npm install
expo doctor --fix-dependencies
I also faced this issue but Enableing USB tethering in phone, and clearing all data in expo app resolved this issue.