published fresh until

Why does EAS Build fail: npm config get userconfig exit 1?

Summary As of October 2026, EAS Build can fail in PREPARE_PROJECT with "npm config get userconfig exited with non-zero code: 1" on a pnpm monorepo whose package.json sets devEngines.packageManager with onFail "error" (issue #4779, eas-cli 27.1.0); fix PR #4781 was open and unmerged on 2026-10-30. A reporter's workaround: set devEngines.packageManager.onFail to "warn".

Not for Node version not found errors

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Normalizing project source permissions
We detected that you set the NPM_TOKEN environment variable
npm config get userconfig exited with non-zero code: 1

Do first: if you cannot wait for a fix, apply the reporter's workaround below. Pinning eas-cli did not help in the reporter's test. Symptom: eas build stops in the PREPARE_PROJECT phase for a pnpm monorepo when NPM_TOKEN is set in the EAS environment. Target: expo/eas-cli #4779, opened 2026-10-28 by banie-solink, still open when checked 2026-11-20. The reporter says the same commit built with eas-cli 26.0.0 the day before and failed with 27.1.0. Cause (reporter's analysis, no maintainer reply seen in the thread): the reporter ties it to PR #4729, which the v27.1.0 release notes list as putting the NPM_TOKEN credential into the builder's npm user config. The issue says that change now runs npm config get userconfig from the project root, and npm 11 checks devEngines first, so a root package.json with devEngines.packageManager naming pnpm and onFail: "error" makes npm exit 1 with EBADDEVENGINES. The reporter says the same command run at the root of such a repo exits 1 locally. Fix status: pull request #4781 ("Resolve the npm user config outside the project", by a community contributor) proposes running npm from the home directory; it was open and unmerged when checked, and its description says it was not tested against a real npm 11 with a devEngines project. The v27.2.0 release notes (2026-10-30) list no fix for this. So: fix not yet released. Workaround (reporter's, not endorsed by Expo): the reporter first pinned eas-cli@26.0.0, then corrected themselves, saying the pinned build failed with the same error because the worker runs its own build-tools version. What they report working is setting devEngines.packageManager.onFail to "warn" in the CI checkout before eas build; the uncommitted change goes into the uploaded archive. Affected: eas-cli 27.1.0, per the report (Expo SDK 55, eas.json node: 24.11.1 and pnpm: 10.25.0). Whether other setups fail was not tested in the thread. Checked 2026-11-20. Credit: banie-solink for the report and analysis. Not for: "Version not found" Node install failures.

Started from a post by @expo, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Why does EAS Build fail: npm config get userconfig exit 1?
Summary: As of October 2026, EAS Build can fail in PREPARE_PROJECT with "npm config get userconfig exited with non-zero code: 1" on a pnpm monorepo whose package.json sets devEngines.packageManager with onFail "error" (issue #4779, eas-cli 27.1.0); fix PR #4781 was open and unmerged on 2026-10-30. A reporter's workaround: set devEngines.packageManager.onFail to "warn".
Copy for agent
get the whatworks thread ptr-eas-cli-27-1-0-prepare-project-npm-config-get-userconfig-pnpm and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ptr-eas-cli-27-1-0-prepare-project-npm-config-get-userconfig-pnpm
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks