EAS build fails with the following error : "Cannot determine which native SDK version your project uses because ‘expo’ is not installed”

Whenever I try to build I get this error.
Cannot determine which native SDK version your project uses because ‘expo’ is not installed

So far, I’ve both tried to build locally and with the following settings (with and without node version) :

    "production": {
      "node": "14.16.0"
    },
    "development": {
      "extends": "production",
      "developmentClient": true,
      "distribution": "internal"
    }

So I tried the two following commands :

  • eas build --platform android --local

My eas-cli version it the 0.47.
My expo SDK version is 43.0.0 , but tried with 44.0.0
My node version is 14.16.0
My yarn version is 1.22.17
I work with a managed workflow

My whole eas.json is the following :

{
  "cli": {
    "version": ">= 0.47.0"
  },
  "build": {
    "production": {
      "node": "14.16.0"
    },
    "development": {
      "extends": "production",
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "extends": "production",
      "distribution": "internal"
    }
  },
  "submit": {
    "production": {}
  }
}

I’m assuming that you have expo package installed.

Install dependencies phase on eas took just 1 second and there were no lockfiles, so I’m assuming there is sth wrong with your project structure. eas.json, app.json and package.json should be in the same directory, eas uploads only content of your git repository. If you want to check what is uploaded you can use eas build:inspect command

1 Like

Hi, sorry for the delay.

eas.json, app.json and package.json are indeed in the same directory.
The only I have between my project and the directory i get when doing a build:inspect is that the yarn.lock and the .git are not present in the created directory.

But when doing a --verbose build, I saw the following warning :

ANDROID_NDK_HOME environment variable was not specified, continuing build without NDK

Is there a chance it’s related ?

Can you describe your project structure?

  • where is eas.json/app.json relative to the root of the git repository
  • where is yarn.lock relative to the root of the git repository
  • do you have any other package.json files except the one next to app.json/eas.json
  • do you use workspaces?
  • where do you run eas build (relative to the git root)

In addition to @wkozyra’s questions, do you have either of the app.json or package.json files or yarn.lock etc. in .gitignore?

Hi,

The project strucute is the following :
/docs/
/project/
.gitignore
.git

Those files and directory are on the root of the project.
On the root of the “project” folder there is my package.json, eas.json and yarn.lock.

I have another package.json in the project.
I don’t use workspaces.
I run eas build where my eas.json is, so on the root of the “project” folder.
And I indeed have my yarn.lock in .gitignore, i’ll take it off and try again.

Probably a good idea to remove yarn.lock from your .gitignore, but I am not sure that will make any difference to your problem.

wkozyra is the expert. I’m just another Expo user, so see what he says, but I suspect the problem is that eas is expecting to find your app.json, package.json etc. at the same location as your .git directory. Expo does have some support for mono-repos and I suppose yours could be classified as some sort of mono-repo. But I know next to nothing about mono-repos and Expo’s support for them.

Well, I think your solution was the right one, I don’t have that expo problem anymore.
So, thanks you two for your help !

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.