Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix npm start "cannot determine native SDK version" error?

I'm trying to run my react native code from a github repository on ubuntu by using npm start and expo. When I run npm start I get the follow error:

"Cannot determine which native SDK version your project uses because the module expo is not installed. Please install it with yarn add expo and try again."

I have tried the 'yarn add expo' but that doesn't seem to work because I can't get yarn to work and it doesn't recognize 'add'. I haven't found anything on this problem either. Does somebody know what is going on?

like image 826
Joppe De Jonghe Avatar asked Apr 22 '20 19:04

Joppe De Jonghe


4 Answers

Try npm install expo instead of yard add expo.

Note: yarn is another package manager just like npm. If you have npm installed already then you can replace yarn add with npm install always.

like image 125
Nitin Bisht Avatar answered Oct 19 '22 14:10

Nitin Bisht


Just wanted to chime in that running npm install solved the problem for me. (I figured out that the problem was probably because my dependencies were not properly installed.)

When grabbing the project from a remote repository, it obviously isn't going to grab the node_modules folder (folder with all the project dependencies) because it's in the .gitignore. Why is it in the .gitignore? Because it's too big and can be easily downloaded on a local machine when needed (by running npm install).

This npm install command installs all dependencies in package.json into a local folder called node_modules, thus ensuring all my dependencies are properly installed. This then allows my project to work.

like image 21
jaquinocode Avatar answered Oct 19 '22 13:10

jaquinocode


I updated npm to the latest version -> npm install -g npm@latest

Uninstalled expo -> npm uninstall -g expo-cli --save

Deleted the .expo folder, reinstalled expo & this worked for me.

like image 36
Tafadzwa N Avatar answered Oct 19 '22 14:10

Tafadzwa N


This might help for some, because I am new to rn expo. And got this error.

yarn install
like image 35
prisar Avatar answered Oct 19 '22 12:10

prisar