Yash Sharma
Yash Sharma

Reputation: 232

expo app build error - package.json does not exist in /home/expo/workingdir/build/client

//eas.json
{
  "cli": {
    "version": ">= 3.13.2"
  },
  "build": {
    "preview": {
      "android": {
        "buildType": "apk"
      }
    },
    "preview2": {
      "android": {
        "gradleCommand": ":app:assembleRelease"
      }
    },
    "preview3": {
      "developmentClient": true
    },
    "production": {}
  }
}

//.gitignore
.expo/
%ProgramData%/
node_modules/
babel.config.json
package-lock.json

I'm trying to build the expo project apk for hours but encountering the same error :

package.json does not exist in /home/expo/workingdir/build/client

I tried using this command : eas build --platform android

Here is the full error enter image description here

Upvotes: 0

Views: 1341

Answers (1)

Shuvo
Shuvo

Reputation: 13

Can you try adding

  "cli": {
    "requireCommit": true
    ...
  },

In you eas.json? It will use git directly to create clone of your project, so if package.json is committed it will also be uploaded to EAS.

for example here is the an eas.json file:

{
    "build": {
      "development": {
        "developmentClient": true,
        "distribution": "internal"
      },
      "preview": {
        "distribution": "internal"
      },
      "production": {}
    },
    "cli": {
      "requireCommit": true
    }
  }

Upvotes: 1

Related Questions