Cannot Downgrade React-Native version from 0.62 to 0.61.4 - react-native

Expo 37 mentions it will work with react-native 0.61.4. When I check my react-native version, it states:
$ npm view react-native version
0.62.2
I have tried: 1-) Running npm remove react-native, then clearing package-lock.json, then setting react-native version 0.61.4 in package.json, and running npm install again. Tried only npm install react-native#0.61.4 as well.
When I run the verification the result is the same:
$ npm view react-native version
0.62.2
How can I properly downgrade to react-native 0.61.4?

npm view react-native version shows the version of current stable version is available.
to check local version, just run:
npm outdated, this will show your local outdated version or using list npm list --depth=0 in root directory

Related

how can I update the newest react-native-reanimated version with expo?

how can I update the newest react-native-reanimated version with expo ?
if I write this:
npx expo install react-native-reanimated
then I dont get the latest reanimated version
Run npm install react-native-reanimated for the latest or change package.json yourself and run npm install afterwards. Remember that expo has ben tested against fixed versions of reanimated, so you will get warnings from expo if you upgrade it yourself.

Unable to find expo in this project - have you run yarn / npm install yet?

I'm Unable to execute the expo start command.
Error Message:
PS C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project> expo start
Starting project at C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project
Unable to find expo in this project - have you run yarn / npm install yet?
├─ action (C:\Users\Jacky Goyal\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:34:11)
├─ C:\Users\Jacky Goyal\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:135:22
└─ expo start (C:\Users\Jacky Goyal\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:350:7)
PS C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project> npm install
added 28 packages, removed 46 packages, changed 34 packages, and audited 653 packages in 8s
17 packages are looking for funding
run `npm fund` for details
7 low severity vulnerabilities
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
PS C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project> npm audit
npm audit report
node-fetch <=2.6.0 || 3.0.0-beta.1 - 3.0.0-beta.8
Denial of Service - https://npmjs.com/advisories/1556
No fix available
node_modules/isomorphic-fetch/node_modules/node-fetch
isomorphic-fetch 2.0.0 - 2.2.1
Depends on vulnerable versions of node-fetch
node_modules/isomorphic-fetch
fbjs 0.7.0 - 1.0.0
Depends on vulnerable versions of isomorphic-fetch
node_modules/fbjs
metro 0.22.1 - 0.63.0
Depends on vulnerable versions of fbjs
Depends on vulnerable versions of metro-config
node_modules/metro
#react-native-community/cli *
Depends on vulnerable versions of metro
Depends on vulnerable versions of react-native
node_modules/#react-native-community/cli
react-native <=0.0.0-ffdfbbec0 || 0.22.0-rc - 0.64.0-rc.4
Depends on vulnerable versions of #react-native-community/cli
Depends on vulnerable versions of fbjs
node_modules/react-native
metro-config <=0.63.0
Depends on vulnerable versions of metro
node_modules/metro-config
7 low severity vulnerabilities\
Some issues need review, and may require choosing
a different dependency```
Change expo version from "^1.0.0" to "~41.0.1" (package.json)
npm install
npm start
if anyone is still facing issues, run
yarn add expo
if you don't have yarn installed on your computer then run
npm install -g yarn
and then run the first command.
I also received your message when installing the commands in the "React Navigation" set-up instructions and fixing vulnerabilities. The problem arises when using the command: npm audit fix --force. If you check the warnings after this command, you get
npm WARN audit Updating expo to 1.0.0, which is a SemVer major change.
So, try running: sudo expo update
If that doesn't work, try installing expo again with: npm install --global expo-cli and then update.
I'm also facing this error. So I run the npm command in the terminal.
npm install
You do not need to change the expo version. you just reinstall it.
Update the Expo to the latest version sudo expo update
Then install the updated npm packages npm install
Fix the issues in the packages npm audit fix --force
Run the Application npm start or expo start
Error ? you are trying to launch the expo framework yet it can't be found installed as part of your application modules
solution? simply find the latest version of Expo i.e for my case "expo": "^44.0.0", then go to your package.json file in your root folder, under the "dependencies" property plug-in that Expo version i.e
"dependencies":{
"expo": "^44.0.0",
}
close package.json file, then in your root folder run the command: npm install
after package installation is done run expo start
I simply used the expo update command.
It asked me
You are currently using SDK 1.0.0. Would you like to update to the
latest version, 44.0.0?
and I said yes, y not..
Every Thing was good to go with the npm start command
Cheers..
See the expo version - default "^1.0.0" , change ==> "expo": "~41.0.1"
Change expo to version "~43.0.0" in package.json
run npm audit fix --force in node_modules directory
here are my 2 cents. This worked for me :
Download latest version of nodejs - https://nodejs.org/en/download/
After installing nodejs reboot your computer
install : npm install --global expo-cli
Generate a new project with - npx expo-cli init projectName
cd projectName
npm start
you can run the below to install all dependencies
npm i
or to install exp
npm i -g expo-cli
This problem I faced was because of cloning a new project and trying to run it.
Always install the modules using the below command
I solved this by
npm install or npm i
I had same problem.
I simply used the expo update command.
You are currently using SDK 1.0.0. Would you like to update to the latest version, 44.0.0?
and I said yes.
Every Thing was good to go with the npm start command
thats all
Is possible that you need an update try this command:
sudo expo update
Please try this
npm install --save expo --legacy-peer-deps
no need to edit package.json if expo version is not 1.0.0
You should register first on expo and then login
I had the same issue but after I logged in it was solved.
here is all about : https://docs.expo.dev/get-started/installation/
In my case, I clonned a Github repository and then used create-expo-app inside the repository directory. So, the command created a directory with the name of the app, but I was not in it: I was running the expo run command in the wrong directory.
Double check that the package.json is in the same directory in which you are running yarn or expo run to avoid this simple mistake.
The same error happened to me. But none of the other answers helped me. In my situation, I have node.js v18.12.1 installed. But when I check with nvm ls, the arrow points to "system", and on my system Xubuntu 22.04, the nodejs version installed is v12.22.9. So I needed to do nvm use 18, then
yarn add expo
expo start
Problem solved!
for window users
just type expo update into your terminal,

errors after running expo start

I have installed latest node version and expo-cli but when I run the command expo start, it gives me this error:
Starting project at C:\Users\Ogacho\Desktop\sharelocation
Expo DevTools is running at http://localhost:19002
Your project is in SDK version >= 33.0.0, but the expo package version seems to be older.
Opening DevTools in the browser... (press shift-d to disable)
Error: React Native is not installed. Please run `npm install` in your project directory.
Couldn't start project. Please fix the errors and restart the project.
Set EXPO_DEBUG=true in your env to view the stack trace.
I have tried clearing my npm cache, deleting my node_modules folder and reinstalling...
This fixed it for me:
Run expo update 35.0.0. (Replace version with your desired version. 35.0.0 is the latest as of this post.) This updates expo, by updating app.json & package.json and installing the latest dependencies.
Referenced from:
https://docs.expo.io/versions/latest/workflow/upgrading-expo-sdk-walkthrough/
Also, check that:
your expo app is the latest version through the app/play store.
your expo cli is the latest version npm install -g expo-cli
Your project is in SDK version >= 33.0.0, but the expo package version seems to be older. If your expo-cli version is older than 2.21.2, run npm install -g expo-cli to get the latest version.
Or, you can change sdkVersion and dependencies to an older version to match the expo-cli doc.Run expo --version to get the expo-cli version. For example, if using expo-cli 2.19.5, you should
app.json, change sdkVersion to "32.0.0",
In package.json, change these dependencies:
{
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"expo": "^32.0.0",
"react": "16.5.0"
}
Delete your project’s node_modules directory and install again
Close your Expo CLI server
Run expo upgrade in your project directory (requires the latest version of expo-cli, you can update with npm i -g expo-cli).
Make sure to check the breaking changes section of this post!
Run expo start -c

React Native version check

I wanted to check the version of the react native I was using in my project when I used the command from my root folder :
D:\Reactnative\Albums>npm view react-native version
0.56.0
The version was 0.56.0 which is not the version I have installed, but on:
D:\Reactnative\Albums>react-native -v
react-native-cli: 2.0.1
react-native: 0.55.4
The version mentioned here is 0.55.4, which is correct.
So why this conflict?
npm view react-native version
You can check the latest version of react native. You can run it under the root of your project or everywhere. Of course, you will need internet connection to check latest version.
react-native -v
If you run under the root of project, it will return the version of two npm packages, react-native-cli and react-native. Those versions are using in your project.
Just wanted to clarify Aung's answer:
npm view react-native version checks globally while react-native -v ran inside project's root folder checks version of the app itself.
Macbook M1 Chip
npm view react-native version

React Native TransformError

I just created a react native app and did an npm install after that. I tried running the app after npm install, and this showed in my emulator. How do i fix this guys?
I had the same problem with "babel-preset-react-native", I removed version 3.0.0 and installed it to 2.1.0.
Remove folder babel-preset-react-native inside node_modules
Change the version of babel-preset-react-native in package.json to 2.1.0
Run npm install