EAS build error when adding dev dependencies
See original GitHub issueBuild/Submit details page URL
Summary
After upgrading to expo-sdk-46 i can’t run eas builds. Local builds work as expected.
By adding an entry (except @babel/core) to devDependencies and compiling with eas on the cloud or locally (--local option) produces the error output bellow.
Managed or bare?
managed
Environment
Environment info
expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.0.1
Shell: 5.8 - /usr/local/bin/zsh
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.15.1 - ~/.nvm/versions/node/v16.16.0/bin/npm
Watchman: 2022.07.04.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8512546
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Expo Workflow: managed
Doctor
🎉 Didn't find any issues with the project!
Error output
Android
[RUN_GRADLEW] Running './gradlew :app:assembleRelease' in /var/folders/sb/705339xs6kg83h_n36j2d4mh0000gn/T/eas-build-local-nodejs/4adeb1c9-d477-48c8-a1b4-3526bb7f3d37/build/android
[RUN_GRADLEW] FAILURE:
[RUN_GRADLEW] Build failed with an exception.
[RUN_GRADLEW] * Where:
[RUN_GRADLEW] Script '/private/var/folders/sb/705339xs6kg83h_n36j2d4mh0000gn/T/eas-build-local-nodejs/4adeb1c9-d477-48c8-a1b4-3526bb7f3d37/build/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 250
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] A problem occurred evaluating script.
[RUN_GRADLEW] > Calling `[node, /private/var/folders/sb/705339xs6kg83h_n36j2d4mh0000gn/T/eas-build-local-nodejs/4adeb1c9-d477-48c8-a1b4-3526bb7f3d37/build/node_modules/@react-native-community/cli/build/bin.js, config]` finished with an exception. Error message: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object
[RUN_GRADLEW] The current character read is 'i' with an int value of 105
[RUN_GRADLEW] Unable to determine the current character, it is not a string, number, array, or object
[RUN_GRADLEW] line number 1
[RUN_GRADLEW] index number 0
[RUN_GRADLEW] info Run CLI with --verbose flag for more details.
[RUN_GRADLEW] ^. Output: info Run CLI with --verbose flag for more details.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED in 2s
[RUN_GRADLEW] Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
IOS
[INSTALL_PODS] Installing pods
[INSTALL_PODS] Using Expo modules
[INSTALL_PODS] Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/micael/.nvm/versions/node/v16.16.0/bin/node
[INSTALL_PODS] error Failed to load configuration of your project.
[INSTALL_PODS] [!] Invalid `Podfile` file: 767: unexpected token at 'info Run CLI with --verbose flag for more details.
[INSTALL_PODS] '.
[INSTALL_PODS]
[INSTALL_PODS] # from /private/var/folders/sb/705339xs6kg83h_n36j2d4mh0000gn/T/eas-build-local-nodejs/d80923fb-2d26-41ee-966f-22e87fad0731/build/ios/Podfile:14
[INSTALL_PODS] # -------------------------------------------
[INSTALL_PODS] # use_expo_modules!
[INSTALL_PODS] > config = use_native_modules!
[INSTALL_PODS] #
[INSTALL_PODS] # -------------------------------------------
[INSTALL_PODS]
Error: pod exited with non-zero code: 1
Reproducible demo or steps to reproduce from a blank project
Create app and add a dev dependency (e.g eas-cli or yarn-deduplicate).
npx create-expo-app bug-eas-cli
cd bug-eas-cli
expo-cli upgrade
yarn add -D eas-cli
Add dummy eas.json , e.g:
{
"build": {
"base": {
"developmentClient": false,
"env": {
"NODE_ENV": "production"
},
"ios": {
"cocoapods": "1.11.3"
}
},
"development": {
"distribution": "internal",
"env": {
"NODE_CONFIG_ENV": "dev"
},
"extends": "base",
"releaseChannel": "dev"
}
},
"submit": {
"production": {}
}
}
Run eas build
eas build --profile development --platform android --no-wait --local --clear-cache
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
EAS build error when reaching "install dependencies"
I have tried clearing the cache and rebuilding the app. When I try npx expo start --dev-client the app works fine. This is...
Read more >Troubleshooting build errors and crashes - Expo Documentation
A reference for troubleshooting build errors and crashes when using EAS Build. This document is under active development; the topic it covers is...
Read more >Development build succeeds, but production fails - Expo Forums
my eas builds succeed with my development profile but fail for production. Same on EAS as well as --local (same behavior for prod...
Read more >eas cli build android fail with errors - #13 by wodin
I worked with expo till now, but as my project matured I started with eas cli, still managed expo, SDK version 42.0.0.
Read more >Classic build works but not EAS Build - #5 by joshua-splend
I also tried upgradin gto latest expo sdk and got similar errors. Managed workflow eas-cli/0.47.0 darwin-x64 node-v16.13.2. Running npm in the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dsokal This is a reproducible version of these two:
It’s not a bug. Development dependencies are necessary for building your bundle. It’s like if you wanted to have a project in TypeScript but transpile it without installing
typescriptfor transpiling. It’s just not possible.