expo-cli
expo-cli copied to clipboard
iOS bare workflow project is malformed
Summary
I started a new clean Bare workflow project using expo-cli. After successful initialization, I run yarn ios
. Unfortunately, the command failed with an error message [ios.xcodeproj]: withIosXcodeprojBaseMod: Could not locate a valid AppDelegate at root.
I use the expo-cli 6.0.2 version.
The app runs without trouble when I start the app using expo-start
and then run it on iOS. It's annoying to see the error when running yarn ios
.
Environment
expo-env-info 1.0.5 environment info: System: OS: macOS 12.5 Shell: 3.5.1 - /opt/homebrew/bin/fish Binaries: Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7678000 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild npmPackages: expo: ~45.0.0 => 45.0.8 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-web: 0.17.7 => 0.17.7 Expo Workflow: bare
Please specify your device/emulator/simulator platform, model and version
macOS 12.5
Error output
✖ Config sync failed [ios.xcodeproj]: withIosXcodeprojBaseMod: Could not locate a valid AppDelegate at root: "/Users/tomassvatek/Repositories/conteg-home-mobile/ContegHomeMobile" Please report this as an issue on https://github.com/expo/expo-cli/issues UnexpectedError: [ios.xcodeproj]: withIosXcodeprojBaseMod: Could not locate a valid AppDelegate at root: "/Users/tomassvatek/Repositories/conteg-home-mobile/ContegHomeMobile" Please report this as an issue on https://github.com/expo/expo-cli/issues at getAppDelegateFilePath (/Users/tomassvatek/.config/yarn/global/node_modules/@expo/config-plugins/src/ios/Paths.ts:52:11) at getAppDelegate (/Users/tomassvatek/.config/yarn/global/node_modules/@expo/config-plugins/src/ios/Paths.ts:114:20) at Object.getSourceRoot (/Users/tomassvatek/.config/yarn/global/node_modules/@expo/config-plugins/src/ios/Paths.ts:119:23) at getProjectName (/Users/tomassvatek/.config/yarn/global/node_modules/@expo/config-plugins/src/ios/utils/Xcodeproj.ts:33:28) at /Users/tomassvatek/.config/yarn/global/node_modules/@expo/config-plugins/src/ios/XcodeProjectFile.ts:23:25 at action (/Users/tomassvatek/.config/yarn/global/node_modules/@expo/config-plugins/src/plugins/withMod.ts:227:29) at interceptingMod (/Users/tomassvatek/.config/yarn/global/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:27) at action (/Users/tomassvatek/.config/yarn/global/node_modules/@expo/config-plugins/src/plugins/withMod.ts:228:14) at interceptingMod (/Users/tomassvatek/.config/yarn/global/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Reproducible demo or steps to reproduce from a blank project
- expo init
- setup <ProjectName>
- select a minimal template (bare and minimal)
- cd <ProjectName>
- yarn ios
That's not a malformed project, that is something using an older version of @expo/config-plugins
. Is your expo-cli
up to date?
That's not a malformed project, that is something using an older version of
@expo/config-plugins
. Is yourexpo-cli
up to date?
Yes, it's up to date. I'm using the 6.0.2 version of expo-cli
. I also tried to reinstall the expo-cli
but it did not help.
Can you try running yarn why @expo/config-plugins
to see where the conflict comes from?
Can you try running
yarn why @expo/config-plugins
to see where the conflict comes from?
Sure. There is the output of the command.
my-app on master [✘!?] on ☁️ took 2s ❯ yarn why @expo/config-plugins
yarn why v1.22.17
[1/4] 🤔 Why do we have the module "@expo/config-plugins"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "@expo/[email protected]"
info Reasons this module exists
- "expo-splash-screen#@expo#prebuild-config" depends on it
- Hoisted from "expo-splash-screen#@expo#prebuild-config#@expo#config-plugins"
- Hoisted from "expo#expo-file-system#@expo#config-plugins"
- Hoisted from "expo#@expo#cli#@expo#config-plugins"
- Hoisted from "expo-splash-screen#@expo#prebuild-config#@expo#config#@expo#config-plugins"
info Disk size without dependencies: "2.03MB"
info Disk size with unique dependencies: "3.75MB"
info Disk size with transitive dependencies: "7.54MB"
info Number of shared dependencies: 46
✨ Done in 0.20s.
@kbrandwijk I fixed the problem.
The expo-cli
package was installed as the global package using NPM (npm install -g expo-cli
). I uninstalled the package using NPM (npm uninstall -g expo-cli
), and then I installed the expo-cli
as a global package using Yarn (yarn global add expo-cli
).
Everything working now, but I don't know why.
@tomassvatek - hard to say exactly what is wrong, but what you're experiencing here is one of the downsides of global packages in our experience. we moved to a cli that is installed directly to the project instead in sdk 46+ https://blog.expo.dev/the-new-expo-cli-f4250d8e3421