Unable to build with eas for IOS platform - build failing at run fastlane stage

Build/Submit details page URL:

Error meesage at run fastlane stage:

Eas-cli version: 0.60.0 (I also tried with the previous version I had 0.53.0)

Managed or bare?
Managed

Hint:
I also saw some people managed to fix this problem by removing the spaces in folder names in the build directory structure with help from expo support (based on this thread SDK 44 - unable to build even a basic 'expo init' project via EAS (for iOS) - bytemeta)
The problem is I couldn’t figure it out how to change build directory structure folders and I was hoping someone here would help me.

hey there, check out the guide for troubleshooting build errors: Troubleshooting build errors and crashes - Expo Documentation

at the bottom of the page there is more information on how to ask a good question after you’ve followed the guide if you’re still stuck: Troubleshooting build errors and crashes - Expo Documentation

you may want to try the eas-plugin-local-buld so you have more control of the situation. I use that with Azure DevOps’ managed agents that provide XCode and CocoaPods for me already.

what do you mean by more control?

@erliskryeziu - it looks like from your error logs this is the exception:

Now using node v16.13.2 (npm v8.1.2)
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'yargs'
Require stack:
- /Users/expo/workingdir/build/node_modules/react-native/scripts/generate-specs-cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/expo/workingdir/build/node_modules/react-native/scripts/generate-specs-cli.js:25:15)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/expo/workingdir/build/node_modules/react-native/scripts/generate-specs-cli.js'
  ]
}

it’s not clear to me why this is missing in your project, however i did notice the following:

you should follow that guidance

1 Like

the NPM_TOKEN in my case doesn’t seem to work with Sonatype Nexus repo proxies when I was using EAS build. Also I can put in a much more powerful build box if I so wanted to.

Btw:

But I think you’re just talking about eas build --local. Not specifically about expo-cli-local-build-plugin, right?

Was there a change that basically allows --local without the expo-cli-local-build-plugin now? I wasn’t aware of that change it would be nice since that’s one less dep to explicitly add.

Yes, apparently. The post I pointed to was where I found out about it.

@brents Thank you for your replies and suggestions, for the moment I managed to solve this problem and build my application , by putting those three packages shown in my expo doctor in a resolution in package.json (for anyone who has the same problem as me) and after that I already made two new builds and it works.
Also thanks for the guidance on how to ask questions regarding troubleshooting build errors, I will check on that now!

Ideally you would just run expo-cli doctor --fix-dependencies and you shouldn’t have to add resolutions to package.json.

I have run into cases where that has not actually fixed the problem, though.

When that has happened for me I have had to remove the lock file and node_modules and then re-install the dependencies. Especially if you’re not on the latest Expo SDK this could potentially upgrade some dependencies further than they should be, so re-run expo-cli doctor after that to check.

1 Like

@wodin
Actually I tried both ways to solve this issue, but unfortunately none of them worked. I also removed the lock file and deleted node modules and reinstalled again, but still didn’t work. I don’t know why this was the only way it worked, it was weird for me as well!

OK. Could possibly be some non-expo package that depends on a newer version of @expo/config-plugins.

Running npm why @expo/config-plugins@5.0.1 might tell you where it’s coming from.