Skip to content

"$schema" is not allowed #2600

Closed
Closed
@saiichihashimoto

Description

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/[email protected]
(for more info, run: npm why @expo/config-plugins)
Expected package @expo/prebuild-config@~7.0.0
Found invalid:
@expo/[email protected]
(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:
[email protected] - expected version: 18.2.0
[email protected] - 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.

  • "$schema" is not allowed
    InvalidEasJsonError: eas.json is not valid.
  • "$schema" is not allowed
    at EasJsonAccessor.readAsync (/Users/shayan/Workspace/sunblocks/node_modules/@expo/eas-json/build/accessor.js:61:19)
    at async EasJsonUtils.getCliConfigAsync (/Users/shayan/Workspace/sunblocks/node_modules/@expo/eas-json/build/utils.js:59:29)
    at async applyCliConfigAsync (/Users/shayan/Workspace/sunblocks/node_modules/eas-cli/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js:17:20)
    at async findProjectDirAndVerifyProjectSetupAsync (/Users/shayan/Workspace/sunblocks/node_modules/eas-cli/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js:92:5)
    at async DynamicPublicProjectConfigContextField.getValueAsync (/Users/shayan/Workspace/sunblocks/node_modules/eas-cli/build/commandUtils/context/DynamicProjectConfigContextField.js:11:28)
    at async Build.getContextAsync (/Users/shayan/Workspace/sunblocks/node_modules/eas-cli/build/commandUtils/EasCommand.js:33:17)
    at async Build.runAsync (/Users/shayan/Workspace/sunblocks/node_modules/eas-cli/build/commands/build/index.js:32:128)
    at async Build.run (/Users/shayan/Workspace/sunblocks/node_modules/eas-cli/build/commandUtils/EasCommand.js:61:16)
    at async Build._run (/Users/shayan/Workspace/sunblocks/node_modules/@oclif/core/lib/command.js:80:22)
    at async Config.runCommand (/Users/shayan/Workspace/sunblocks/node_modules/@oclif/core/lib/config/config.js:301:25)
    Error: build command failed.

Reproducible demo or steps to reproduce from a blank project

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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions