Skip to content

@expo/steps imports fast-glob without declaring it — eas build crashes with MODULE_NOT_FOUND under a pnpm global install #4049

Description

@ifeanyi-ugwu

Summary

@expo/steps imports fast-glob but does not declare it as a dependency. When eas-cli is installed globally with pnpm — whose isolated node_modules layout exposes only declared dependencies to each package — loading any command that pulls in @expo/steps fails with MODULE_NOT_FOUND.

Under npm the bug stays hidden: the flat layout hoists the fast-glob copy declared by eas-cli itself (packages/eas-cli/package.json) next to @expo/steps, so the undeclared import accidentally resolves. The same hoisting happens in the yarn workspace, which is why CI doesn't catch it.

Reproduction

pnpm add --global eas-cli   # 21.0.2
eas build --platform android --profile development

Output

ModuleLoadError: [MODULE_NOT_FOUND] require failed to load
.../node_modules/eas-cli/build/commands/build/index.js:
Cannot find module 'fast-glob'
Require stack:
- .../node_modules/@expo/steps/dist/BuildStepContext.js
- .../node_modules/@expo/steps/dist/index.js
- .../node_modules/eas-cli/build/project/customBuildConfig.js
- .../node_modules/eas-cli/build/build/android/prepareJob.js
- .../node_modules/eas-cli/build/build/android/build.js
- .../node_modules/eas-cli/build/build/runBuildAndSubmit.js
- .../node_modules/eas-cli/build/commands/build/index.js
...
Code: MODULE_NOT_FOUND

Cause

Both current on main at time of filing; the published @expo/steps@21.0.2 matches (the require site is dist/BuildStepContext.js:7).

Fix

Add fast-glob to dependencies in packages/steps/package.json.

Workaround

Install eas-cli globally with npm instead of pnpm.

Environment

  • eas-cli 21.0.2 (pnpm add --global eas-cli, pnpm 11.12.0)
  • eas-cli/21.0.2 darwin-arm64 node-v26.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions