DEV Community

Cover image for How to fix React Native version mismatch
Takunda Madechangu
Takunda Madechangu

Posted on

How to fix React Native version mismatch

To fix this just do the following

1). Open package.json

2). Change this line

"react-native": "^0.61.4",

to reflect the new version.

For example if it says Javascript version is 20 and React Version is 19, your line would become

"react-native": "20",

3). Save the file
4). Close your eyes, delete the node_modules folder
5). Open your eyes and type

If you use Yarn:

yarn install

if you use NPM:

npm install

6). Start the app by typing

yarn start -c

or

npm start -c

or

expo start

Top comments (7)

Collapse
 
khajanizamuddin1 profile image
Khaja Nizamuddin

Javascript was one version behind the installed native version,

So, I changed the sdk version to just 1 behind Changed this line in my package.json "react-native": "github.com/expo/react-native/archi...",

to "react-native": "github.com/expo/react-native/archi...",

and saved the file, and app started working (Didn't even restart the app)

Collapse
 
takunda profile image
Takunda Madechangu

That's great man.

Collapse
 
crismerino profile image
Chris Merino

Thank you very much for this!

Collapse
 
mohammad_makeen profile image
Mohammad Makeen

This awesome man!

Collapse
 
robertokbr profile image
Roberto Junior

WTF Facebook? I just started a new project with the CLI and got this error...

Collapse
 
ifone456 profile image
Gerzon Z.

I dont understand, when this happens? I never had this issue before

Collapse
 
takunda profile image
Takunda Madechangu

This happens when your project has different version from the one specified in package.json