eas build fails: TypeError: config_plugins_1.IOSConfig.XcodeUtils.sanitizedName is not a function

After running eas build,

I’m receiving the following error:

TypeError: config_plugins_1.IOSConfig.XcodeUtils.sanitizedName is not a function

I’m using the managed workflow.

My eas.json looks like this

{
  "build": {
    "release": {},
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    }
  }
}

What could this mean?

Here’s the data from expo diagnostics:

    System:
      OS: Windows 10 10.0.19043
    Binaries:
      Node: 15.0.1 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.10 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 7.0.3 - C:\Program Files\nodejs\npm.CMD
    Utilities:
      Git: 2.28.0. - C:\Program Files\Git\cmd\git.EXE
    npmPackages:
      expo: ^42.0.0 => 42.0.3
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2
      react-native-web: ~0.13.12 => 0.13.18

when do you see this error? what version of eas-cli do you have installed?

"eas-cli@0.26.0"

It comes up immediately after running eas build

can you try uninstalling eas-cli and then reinstalling it? is eas-cli installed locally in your project or globally?

just upgraded to eas-cli@0.27.0

It’s installed globally.

Still receiving the same error.

app.json looks like this:

{
  "expo": {
    "name": "appname",
    "slug": "appname",
    "description": "App description.",
    "version": "0.0.1",
    "orientation": "portrait",
    "userInterfaceStyle": "automatic",
    "scheme": "appname",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": false,
      "bundleIdentifier": "com.10000multiplier.appname"
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/icon.png",
        "backgroundColor": "#000"
      }
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}

did you uninstall it first or just install on top? try uninstalling and then reinstalling

It worked.

Thank you so much!

do you happen to use yarn for global installs?

yep, I had to run these commands:

yarn global remove eas-cli

yarn global add eas-cli@latest

2 Likes

interesting, this type of problem seems to occur only with yarn global installs, not with npm

Just wanted to add that this same error is also sometimes occurring when eas-cli is installed as a local project dependency via yarn, and removing and reinstalling node_modules via yarn fixes the problem.

1 Like

This error is the result of eas-cli cli using the wrong version of @expo/config-plugins, we define that dependency using strict version (without ^ or ~), so if the version is wrong it must be bug in yarn and we can’t really do much about it

1 Like