EAS Build failure - fails to resolve dependencies in cloud

Expo 44.0.4
My EAS builds fail on IOS and Android. The same builds work when I use the local flag. When evaluating the app.config.ts The build fails to resolve any modules. I assume, I have something configured wrong, but can’t figure out what. Initially it failed to resolve module dotenv/config and after removing that it fails to resolve any config plugins. The install dependencies step runs and completes. I found this stackoverflow post but no one has answered. Please help.

Using yarn 3.1.0, is this a workspace issue?

# yarn berry
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

I wasn’t ignoring the proper yarn files for zero install, but after correcting this I still have the same error. I am uploading my install-state.gz file.

My eas.json

{
  "build": {
    "release": {},
    "development": {
      "node": "14.16.0",
      "developmentClient": true,
      "distribution": "internal"
    },
    "production": {
      "node": "14.16.0",
      "developmentClient": false,
      "distribution": "internal",
      "env": {}
    }
  },
  "cli": {
    "version": ">= 0.35.0"
  }
}

I have solved the issue. I was not aware that yarn pnp didn’t support react native. I removed pnp support and now I am able to get past dependency installation.

For others
yarn .gitignore

# yarn berry
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

My .yarnrc.yml

yarnPath: '.yarn/releases/yarn-berry.cjs'
nodeLinker: 'node-modules'

Once I had yarn configured properly eas build worked.

1 Like