expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
807 stars 83 forks source link

"$schema" is not allowed #2600

Open saiichihashimoto opened 3 weeks ago

saiichihashimoto commented 3 weeks ago

Build/Submit details page URL

No response

Summary

When running eas build with a $schema definition in the eas.json, it fails with the following error:

eas.json is not valid.
- "$schema" is not allowed
    Error: build command failed.

My eas.json has "$schema": "https://raw.githubusercontent.com/expo/eas-cli/main/packages/eas-json/schema/eas.schema.json", which is the one in json schema store.

Managed or bare?

managed

Environment

expo-env-info 1.2.0 environment info: System: OS: macOS 14.6 Shell: 5.9 - /bin/zsh Binaries: Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm Watchman: 2024.08.26.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.15.2 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 24.0, iOS 18.0, macOS 15.0, tvOS 18.0, visionOS 2.0, watchOS 11.0 IDEs: Android Studio: 2024.1 AI-241.19072.14.2412.12360217 Xcode: 16.0/16A242d - /usr/bin/xcodebuild Expo Workflow: bare

Detailed check results:

Expected package @expo/config-plugins@~8.0.0 Found invalid: @expo/config-plugins@7.8.4 (for more info, run: npm why @expo/config-plugins) Expected package @expo/prebuild-config@~7.0.0 Found invalid: @expo/prebuild-config@6.7.3 (for more info, run: npm why @expo/prebuild-config) Advice: Upgrade dependencies that are using the invalid package versions.

The following packages should be updated for best compatibility with the installed expo version: react@18.3.1 - expected version: 18.2.0 react-native@0.75.3 - expected version: 0.74.5 Your project may not work correctly until you install the expected versions of the packages. Found outdated dependencies Advice: Use 'npx expo install --check' to review and upgrade your dependencies.

Error output

eas.json is not valid.

Reproducible demo or steps to reproduce from a blank project

EXPO_DEBUG=true npx eas build --platform android --local

szdziedzic commented 5 days ago

We are using joi for eas.json schema validation and setup in a way that it fails if it detects any fields other than allowed ones. $schema currently isn't allowed. We can change this behavior though. If you are a VSCode user you can use the Expo plugin to have schema definitions provided for you.