0

EAS build gives error

The nearest package directory (/home/expo/workingdir/build/apps/my-app) doesn't seem to be part of the project declared in /home/expo/workingdir/build.

Solution

At first make sure to change

root/apps/my-app/package.json

"scripts": {
    "eas-build-pre-install": "cd ../../ && node tools/scripts/eas-build-pre-install.mjs . apps/my-app && cp **package-lock.json** apps/my-app",
    "eas-build-post-install": "cd ../../ && node tools/scripts/eas-build-post-install.mjs . apps/my-app"
  }

to

"scripts": {
    "eas-build-pre-install": "cd ../../ && node tools/scripts/eas-build-pre-install.mjs . apps/my-app && cp **yarn.lock** apps/my-app",
    "eas-build-post-install": "cd ../../ && node tools/scripts/eas-build-post-install.mjs . apps/my-app"
  }

for Yarn 3 you should include .yarn and .yarnrc.yml under "root/apps/my-app" also.

Emilien
  • 614
  • 1
  • 5
  • 17

0 Answers0