DEV Community

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

Posted on

9 5

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

Image of Docusign

๐Ÿ› ๏ธ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more