EAS Android Build Failing - "Cannot determine which native SDK version ... because 'expo' is not installed"

Hi everyone,

My Android build is failing. Upon looking at the logs, I have the error message:

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.

Expo is definitely installed and the node-modules folder is in the immediate directory. Running expo start brings up the localhost appropriately, and I am able to publish the app in Expo, so I’m not sure why this would not be the case with EAS. Rerunning npm install expo does not fix this problem, either.

When I look at the logs of the failed build, it does state that my SDK version is 43.0.0, so honestly quite confused. Has anyone ran into a similar problem?

My current EAS version is eas-cli/0.39.0 wsl-x64 node-v16.13.0. I am using managed workflow.

I don’t know if it will be of use, but here is my eas.json:

{
  "cli": {
    "version": ">= 0.39.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal"
    },
    "production": {}
  },
  "submit": {
    "production": {}
  }
}

Thank you for the help!

your lockfile was created using npm 7 or higher, but eas builder has npm 6, you can either

  • downgrade your lockfile to older format
  • upgrade node version on eas by specifying node field in eas.json build profile
1 Like

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